Beware throwaway comments; that way overanalysis lies. This was a challenge.
Taking the 2006 neighbourhoods population into account, the human centre of Toronto is at 43.717955°N, 79.389828°W …
… pretty close to the one I’ve already worked out by ward.
Scraping the neighbourhood populations was hard. For the 140 neighbourhoods, the data is stored in a pdf with the URL like http://www.toronto.ca/demographics/cns_profiles/2006/pdf1/cpa124.pdf (in this case, 124; Kennedy Park, represent!). The population number is stored in a table on page 2 of each pdf. I used pdf2xml to convert the files into something parseable.
Of course, the tables weren’t exactly in the same place in every file, so I took a sample of 10% of the files, and worked out the X & Y coordinates of the population box. pdf2xml spits out elements like
<TOKEN sid="p2_s427" id="p2_w417" font-name="arialmt" serif="yes" fixed-width="yes" bold="no" italic="no" font-size="7.47183" font-color="#000000" rotation="0" angle="0" x="299.739" y="122.117" base="129.634" width="22.7692" height="9.94501">17,050</TOKEN>
Yes, I should have used an XML parser, but a Small Matter of Perl got me 126 out of the 140 matching. The rest I keyed in by hand …
Table after the jump.
| Number |
Name |
Xcentre |
Ycentre |
2006 Population |
| 1 |
West Humber-Clairville |
613067.2 |
4841295.6 |
32265 |
| 2 |
Mount Olive-Silverstone-Jamestown |
613725.7 |
4844721.5 |
32130 |
| 3 |
Thistletown-Beaumond Heights |
615641.4 |
4843779.3 |
9925 |
| 4 |
Rexdale-Kipling |
615471.6 |
4842182.1 |
10725 |
| 5 |
Elms-Old Rexdale |
616864.3 |
4841958.3 |
9440 |
| 6 |
Kingsview Village-The Westway |
616999.2 |
4839463.2 |
21395 |
| 7 |
Willowridge-Martingrove-Richview |
616516.0 |
4837747.0 |
20920 |
| 8 |
Humber Heights-Westmount |
619059.2 |
4838748.7 |
10525 |
| 9 |
Edenbridge-Humber Valley |
619098.9 |
4836376.3 |
14450 |
| 10 |
Princess-Rosethorn |
617325.9 |
4835809.9 |
10965 |
| 11 |
Eringate-Centennial-West Deane |
614449.9 |
4834865.0 |
18535 |
| 12 |
Markland Woods |
615060.8 |
4832163.6 |
10240 |
| 13 |
Etobicoke West Mall |
615395.0 |
4833444.7 |
10680 |
| 14 |
Islington-City Centre West |
617492.4 |
4832195.1 |
32815 |
| 15 |
Kingsway South |
620093.1 |
4834465.3 |
8790 |
| 16 |
Stonegate-Queensway |
620891.7 |
4832475.1 |
23815 |
| 17 |
Mimico |
620987.8 |
4830289.4 |
24965 |
| 18 |
New Toronto |
620215.5 |
4828586.2 |
10655 |
| 19 |
Long Branch |
618378.3 |
4827638.3 |
9625 |
| 20 |
Alderwood |
617690.7 |
4829026.6 |
11655 |
| 21 |
Humber Summit |
616210.2 |
4846106.4 |
12770 |
| 22 |
Humbermede |
617342.3 |
4844401.6 |
14780 |
| 23 |
Pelmo Park-Humberlea |
618536.2 |
4841544.1 |
8725 |
| 24 |
Black Creek |
618949.6 |
4846816.3 |
21715 |
| 25 |
Glenfield-Jane Heights |
619677.1 |
4844696.7 |
30880 |
| 26 |
Downsview-Roding-CFB |
621554.7 |
4843348.4 |
32010 |
| 27 |
York University Heights |
621618.2 |
4846959.8 |
26140 |
| 28 |
Rustic |
620984.3 |
4840928.7 |
10040 |
| 29 |
Maple Leaf |
622372.2 |
4841392.4 |
10270 |
| 30 |
Brookhaven-Amesbury |
622004.2 |
4839805.6 |
17325 |
| 31 |
Yorkdale-Glen Park |
624270.0 |
4841324.8 |
14825 |
| 32 |
Englemount-Lawrence |
625844.9 |
4841986.9 |
21125 |
| 33 |
Clanton Park |
625098.1 |
4844376.4 |
13735 |
| 34 |
Bathurst Manor |
624257.8 |
4846910.1 |
14945 |
| 35 |
Westminster-Branson |
624527.4 |
4848473.4 |
24395 |
| 36 |
Newtonbrook West |
626196.2 |
4849277.9 |
20485 |
| 37 |
Willowdale West |
626518.7 |
4847651.0 |
12520 |
| 38 |
Lansing-Westgate |
626815.0 |
4845775.4 |
14440 |
| 39 |
Bedford Park-Nortown |
627213.5 |
4843260.5 |
21960 |
| 40 |
St.Andrew-Windfields |
630470.7 |
4846071.6 |
17555 |
| 41 |
Bridle Path-Sunnybrook-York Mills |
630548.0 |
4843265.2 |
8210 |
| 42 |
Banbury-Don Mills |
632877.2 |
4844050.5 |
25435 |
| 43 |
Victoria Village |
635702.5 |
4843094.1 |
17050 |
| 44 |
Flemingdon Park |
634298.9 |
4841667.8 |
21290 |
| 45 |
Parkwoods-Donalda |
634415.2 |
4846011.0 |
33835 |
| 46 |
Pleasant View |
633945.9 |
4849571.3 |
16615 |
| 47 |
Don Valley Village |
632453.2 |
4849113.8 |
26640 |
| 48 |
Hillcrest Village |
632315.2 |
4851300.2 |
18330 |
| 49 |
Bayview Woods-Steeles |
630139.3 |
4850572.8 |
13295 |
| 50 |
Newtonbrook East |
628234.8 |
4849952.1 |
15565 |
| 51 |
Willowdale East |
628635.6 |
4847639.4 |
41060 |
| 52 |
Bayview Village |
630587.9 |
4848305.7 |
15370 |
| 53 |
Henry Farm |
633490.5 |
4847782.6 |
11290 |
| 54 |
O’Connor-Parkview |
635964.7 |
4840673.8 |
17745 |
| 55 |
Thorncliffe Park |
632920.8 |
4840731.9 |
17945 |
| 56 |
Leaside-Bennington |
631624.1 |
4840239.4 |
15980 |
| 57 |
Broadview North |
632505.9 |
4838623.6 |
11590 |
| 58 |
Old East York |
634099.4 |
4839530.0 |
9025 |
| 59 |
Danforth Village – East York |
634463.4 |
4838733.7 |
16500 |
| 60 |
Woodbine-Lumsden |
636080.2 |
4839262.4 |
8050 |
| 61 |
Crescent Town |
637319.9 |
4839413.6 |
15210 |
| 62 |
East End-Danforth |
637060.3 |
4838203.6 |
20100 |
| 63 |
The Beaches |
637061.4 |
4836738.2 |
20420 |
| 64 |
Woodbine Corridor |
635779.3 |
4837348.8 |
11550 |
| 65 |
Greenwood-Coxwell |
635069.9 |
4836873.8 |
14700 |
| 66 |
Danforth Village – Toronto |
634592.0 |
4838129.1 |
9575 |
| 67 |
Playter Estates-Danforth |
632592.3 |
4837612.2 |
7685 |
| 68 |
North Riverdale |
632898.2 |
4836759.5 |
12430 |
| 69 |
Blake-Jones |
634005.9 |
4837244.0 |
7765 |
| 70 |
South Riverdale |
634190.5 |
4834481.3 |
24430 |
| 71 |
Cabbagetown-South St.James Town |
631711.3 |
4836254.4 |
11120 |
| 72 |
Regent Park |
632178.3 |
4835411.7 |
10385 |
| 73 |
Moss Park |
631641.5 |
4835016.0 |
15480 |
| 74 |
North St.James Town |
630971.0 |
4836457.7 |
17110 |
| 75 |
Church-Yonge Corridor |
630688.8 |
4835346.4 |
24370 |
| 76 |
Bay Street Corridor |
630149.9 |
4835096.5 |
15320 |
| 77 |
Waterfront Communities-The Island |
630654.2 |
4832628.7 |
26025 |
| 78 |
Kensington-Chinatown |
629226.6 |
4834635.7 |
17090 |
| 79 |
University |
628893.3 |
4835623.5 |
5905 |
| 80 |
Palmerston-Little Italy |
627513.4 |
4835226.5 |
13775 |
| 81 |
Trinity-Bellwoods |
627778.0 |
4834233.7 |
16605 |
| 82 |
Niagara |
628038.5 |
4832768.6 |
14575 |
| 83 |
Dufferin Grove |
625994.8 |
4834785.4 |
11805 |
| 84 |
Little Portugal |
626576.7 |
4833919.4 |
12120 |
| 85 |
South Parkdale |
625869.0 |
4832698.5 |
21005 |
| 86 |
Roncesvalles |
625556.5 |
4833742.3 |
14650 |
| 87 |
High Park-Swansea |
623552.0 |
4833589.6 |
19980 |
| 88 |
High Park North |
623656.1 |
4834979.3 |
20970 |
| 89 |
Runnymede-Bloor West Village |
622089.8 |
4835137.9 |
9565 |
| 90 |
Junction Area |
623219.1 |
4836121.8 |
13175 |
| 91 |
Weston-Pellam Park |
624101.9 |
4836817.1 |
12095 |
| 92 |
Corsa Italia-Davenport |
625129.2 |
4837237.3 |
14415 |
| 93 |
Dovercourt-Wallace Emerson-Juncti |
625876.2 |
4835922.5 |
34725 |
| 94 |
Wychwood |
626901.5 |
4837194.4 |
14200 |
| 95 |
Annex |
628646.3 |
4836632.3 |
27480 |
| 96 |
Casa Loma |
628295.1 |
4837770.7 |
9810 |
| 97 |
Yonge-St.Clair |
629106.1 |
4838455.4 |
11230 |
| 98 |
Rosedale-Moore Park |
630586.2 |
4837913.0 |
20605 |
| 99 |
Mount Pleasant East |
630114.5 |
4840350.4 |
15215 |
| 100 |
Yonge-Eglinton |
628610.7 |
4840310.9 |
10500 |
| 101 |
Forest Hill South |
627768.0 |
4839172.9 |
10840 |
| 102 |
Forest Hill North |
626633.2 |
4840222.2 |
12295 |
| 103 |
Lawrence Park South |
628380.6 |
4841691.3 |
14820 |
| 104 |
Mount Pleasant West |
629437.3 |
4840292.6 |
23735 |
| 105 |
Lawrence Park North |
628520.3 |
4843119.8 |
13750 |
| 106 |
Humewood-Cedarvale |
626696.2 |
4838793.3 |
13915 |
| 107 |
Oakwood-Vaughan |
625728.1 |
4838459.5 |
21440 |
| 108 |
Briar Hill-Belgravia |
624651.4 |
4839603.0 |
14200 |
| 109 |
Caledonia-Fairbanks |
624484.0 |
4838438.2 |
10280 |
| 110 |
Keelesdale-Eglinton West |
623188.0 |
4838108.2 |
11225 |
| 111 |
Rockcliffe-Smythe |
621354.2 |
4836852.2 |
22380 |
| 112 |
Beechborough-Greenbrook |
622536.0 |
4838923.0 |
6530 |
| 113 |
Weston |
619585.3 |
4839920.7 |
16470 |
| 114 |
Lambton Baby Point |
621257.7 |
4834917.3 |
7780 |
| 115 |
Mount Dennis |
620879.9 |
4838325.0 |
12840 |
| 116 |
Steeles |
635002.7 |
4852463.5 |
24705 |
| 117 |
L’Amoreaux |
635617.5 |
4850563.0 |
45865 |
| 118 |
Tam O’Shanter-Sullivan |
636551.0 |
4848844.5 |
27240 |
| 119 |
Wexford/Maryvale |
636967.1 |
4845345.4 |
26655 |
| 120 |
Clairlea-Birchmount |
638437.1 |
4841491.4 |
19855 |
| 121 |
Oakridge |
638602.7 |
4839700.5 |
13370 |
| 122 |
Birchcliffe-Cliffside |
639785.7 |
4839420.8 |
21655 |
| 123 |
Cliffcrest |
642100.5 |
4842406.3 |
14530 |
| 124 |
Kennedy Park |
640101.0 |
4842859.5 |
17035 |
| 125 |
Ionview |
639104.3 |
4843921.6 |
13030 |
| 126 |
Dorset Park |
638530.2 |
4846563.3 |
24365 |
| 127 |
Bendale |
640259.4 |
4846723.4 |
25490 |
| 128 |
Agincourt South-Malvern West |
639525.8 |
4849844.6 |
21565 |
| 129 |
Agincourt North |
639405.7 |
4851729.0 |
30160 |
| 130 |
Milliken |
638702.7 |
4853405.6 |
26265 |
| 131 |
Rouge |
645823.3 |
4853606.0 |
43180 |
| 132 |
Malvern |
642963.3 |
4851584.7 |
44315 |
| 133 |
Centennial Scarborough |
648771.2 |
4849367.1 |
12450 |
| 134 |
Highland Creek |
646619.5 |
4850235.5 |
12845 |
| 135 |
Morningside |
644258.2 |
4849253.5 |
17205 |
| 136 |
West Hill |
646738.8 |
4847660.4 |
25635 |
| 137 |
Woburn |
642562.5 |
4847484.6 |
52455 |
| 138 |
Eglinton East |
641256.1 |
4844588.7 |
22385 |
| 139 |
Scarborough Village |
643564.0 |
4844399.4 |
15585 |
| 140 |
Guildwood |
645300.4 |
4845556.0 |
10025 |
The total population I scraped is within 0.1% of the official 2006 population of the city, so I’m good enough.
No related posts.
Related posts brought to you by Yet Another Related Posts Plugin.
Beware throwaway comments; that way overanalysis lies. This was a challenge.
Taking the 2006 neighbourhoods population into account, the human centre of Toronto is at 43.717955°N, 79.389828°W ...
[osm_map lat="43.717955" long="-79.389828" zoom="16" width="600" height="450" marker="43.717955,-79.389828" marker_name="wpttemp-red.png"]
... pretty close to the one I've already worked out by ward.
Scraping the neighbourhood populations was hard. For the 140 neighbourhoods, the data is stored in a pdf with the URL like http://www.toronto.ca/demographics/cns_profiles/2006/pdf1/cpa124.pdf (in this case, 124; Kennedy Park, represent!). The population number is stored in a table on page 2 of each pdf. I used pdf2xml to convert the files into something parseable.
Of course, the tables weren't exactly in the same place in every file, so I took a sample of 10% of the files, and worked out the X & Y coordinates of the population box. pdf2xml spits out elements like
[code language="xml"]
<TOKEN sid="p2_s427" id="p2_w417" font-name="arialmt" serif="yes" fixed-width="yes" bold="no" italic="no" font-size="7.47183" font-color="#000000" rotation="0" angle="0" x="299.739" y="122.117" base="129.634" width="22.7692" height="9.94501">17,050</TOKEN>
[/code]
Yes, I should have used an XML parser, but a Small Matter of Perl got me 126 out of the 140 matching. The rest I keyed in by hand ...
Table after the jump.
Number
Name
Xcentre
Ycentre
2006 Population
1
West Humber-Clairville
613067.2
4841295.6
32265
2
Mount Olive-Silverstone-Jamestown
613725.7
4844721.5
32130
3
Thistletown-Beaumond Heights
615641.4
4843779.3
9925
4
Rexdale-Kipling
615471.6
4842182.1
10725
5
Elms-Old Rexdale
616864.3
4841958.3
9440
6
Kingsview Village-The Westway
616999.2
4839463.2
21395
7
Willowridge-Martingrove-Richview
616516.0
4837747.0
20920
8
Humber Heights-Westmount
619059.2
4838748.7
10525
9
Edenbridge-Humber Valley
619098.9
4836376.3
14450
10
Princess-Rosethorn
617325.9
4835809.9
10965
11
Eringate-Centennial-West Deane
614449.9
4834865.0
18535
12
Markland Woods
615060.8
4832163.6
10240
13
Etobicoke West Mall
615395.0
4833444.7
10680
14
Islington-City Centre West
617492.4
4832195.1
32815
15
Kingsway South
620093.1
4834465.3
8790
16
Stonegate-Queensway
620891.7
4832475.1
23815
17
Mimico
620987.8
4830289.4
24965
18
New Toronto
620215.5
4828586.2
10655
19
Long Branch
618378.3
4827638.3
9625
20
Alderwood
617690.7
4829026.6
11655
21
Humber Summit
616210.2
4846106.4
12770
22
Humbermede
617342.3
4844401.6
14780
23
Pelmo Park-Humberlea
618536.2
4841544.1
8725
24
Black Creek
618949.6
4846816.3
21715
25
Glenfield-Jane Heights
619677.1
4844696.7
30880
26
Downsview-Roding-CFB
621554.7
4843348.4
32010
27
York University Heights
621618.2
4846959.8
26140
28
Rustic
620984.3
4840928.7
10040
29
Maple Leaf
622372.2
4841392.4
10270
30
Brookhaven-Amesbury
622004.2
4839805.6
17325
31
Yorkdale-Glen Park
624270.0
4841324.8
14825
32
Englemount-Lawrence
625844.9
4841986.9
21125
33
Clanton Park
625098.1
4844376.4
13735
34
Bathurst Manor
624257.8
4846910.1
14945
35
Westminster-Branson
624527.4
4848473.4
24395
36
Newtonbrook West
626196.2
4849277.9
20485
37
Willowdale West
626518.7
4847651.0
12520
38
Lansing-Westgate
626815.0
4845775.4
14440
39
Bedford Park-Nortown
627213.5
4843260.5
21960
40
St.Andrew-Windfields
630470.7
4846071.6
17555
41
Bridle Path-Sunnybrook-York Mills
630548.0
4843265.2
8210
42
Banbury-Don Mills
632877.2
4844050.5
25435
43
Victoria Village
635702.5
4843094.1
17050
44
Flemingdon Park
634298.9
4841667.8
21290
45
Parkwoods-Donalda
634415.2
4846011.0
33835
46
Pleasant View
633945.9
4849571.3
16615
47
Don Valley Village
632453.2
4849113.8
26640
48
Hillcrest Village
632315.2
4851300.2
18330
49
Bayview Woods-Steeles
630139.3
4850572.8
13295
50
Newtonbrook East
628234.8
4849952.1
15565
51
Willowdale East
628635.6
4847639.4
41060
52
Bayview Village
630587.9
4848305.7
15370
53
Henry Farm
633490.5
4847782.6
11290
54
O'Connor-Parkview
635964.7
4840673.8
17745
55
Thorncliffe Park
632920.8
4840731.9
17945
56
Leaside-Bennington
631624.1
4840239.4
15980
57
Broadview North
632505.9
4838623.6
11590
58
Old East York
634099.4
4839530.0
9025
59
Danforth Village - East York
634463.4
4838733.7
16500
60
Woodbine-Lumsden
636080.2
4839262.4
8050
61
Crescent Town
637319.9
4839413.6
15210
62
East End-Danforth
637060.3
4838203.6
20100
63
The Beaches
637061.4
4836738.2
20420
64
Woodbine Corridor
635779.3
4837348.8
11550
65
Greenwood-Coxwell
635069.9
4836873.8
14700
66
Danforth Village - Toronto
634592.0
4838129.1
9575
67
Playter Estates-Danforth
632592.3
4837612.2
7685
68
North Riverdale
632898.2
4836759.5
12430
69
Blake-Jones
634005.9
4837244.0
7765
70
South Riverdale
634190.5
4834481.3
24430
71
Cabbagetown-South St.James Town
631711.3
4836254.4
11120
72
Regent Park
632178.3
4835411.7
10385
73
Moss Park
631641.5
4835016.0
15480
74
North St.James Town
630971.0
4836457.7
17110
75
Church-Yonge Corridor
630688.8
4835346.4
24370
76
Bay Street Corridor
630149.9
4835096.5
15320
77
Waterfront Communities-The Island
630654.2
4832628.7
26025
78
Kensington-Chinatown
629226.6
4834635.7
17090
79
University
628893.3
4835623.5
5905
80
Palmerston-Little Italy
627513.4
4835226.5
13775
81
Trinity-Bellwoods
627778.0
4834233.7
16605
82
Niagara
628038.5
4832768.6
14575
83
Dufferin Grove
625994.8
4834785.4
11805
84
Little Portugal
626576.7
4833919.4
12120
85
South Parkdale
625869.0
4832698.5
21005
86
Roncesvalles
625556.5
4833742.3
14650
87
High Park-Swansea
623552.0
4833589.6
19980
88
High Park North
623656.1
4834979.3
20970
89
Runnymede-Bloor West Village
622089.8
4835137.9
9565
90
Junction Area
623219.1
4836121.8
13175
91
Weston-Pellam Park
624101.9
4836817.1
12095
92
Corsa Italia-Davenport
625129.2
4837237.3
14415
93
Dovercourt-Wallace Emerson-Juncti
625876.2
4835922.5
34725
94
Wychwood
626901.5
4837194.4
14200
95
Annex
628646.3
4836632.3
27480
96
Casa Loma
628295.1
4837770.7
9810
97
Yonge-St.Clair
629106.1
4838455.4
11230
98
Rosedale-Moore Park
630586.2
4837913.0
20605
99
Mount Pleasant East
630114.5
4840350.4
15215
100
Yonge-Eglinton
628610.7
4840310.9
10500
101
Forest Hill South
627768.0
4839172.9
10840
102
Forest Hill North
626633.2
4840222.2
12295
103
Lawrence Park South
628380.6
4841691.3
14820
104
Mount Pleasant West
629437.3
4840292.6
23735
105
Lawrence Park North
628520.3
4843119.8
13750
106
Humewood-Cedarvale
626696.2
4838793.3
13915
107
Oakwood-Vaughan
625728.1
4838459.5
21440
108
Briar Hill-Belgravia
624651.4
4839603.0
14200
109
Caledonia-Fairbanks
624484.0
4838438.2
10280
110
Keelesdale-Eglinton West
623188.0
4838108.2
11225
111
Rockcliffe-Smythe
621354.2
4836852.2
22380
112
Beechborough-Greenbrook
622536.0
4838923.0
6530
113
Weston
619585.3
4839920.7
16470
114
Lambton Baby Point
621257.7
4834917.3
7780
115
Mount Dennis
620879.9
4838325.0
12840
116
Steeles
635002.7
4852463.5
24705
117
L'Amoreaux
635617.5
4850563.0
45865
118
Tam O'Shanter-Sullivan
636551.0
4848844.5
27240
119
Wexford/Maryvale
636967.1
4845345.4
26655
120
Clairlea-Birchmount
638437.1
4841491.4
19855
121
Oakridge
638602.7
4839700.5
13370
122
Birchcliffe-Cliffside
639785.7
4839420.8
21655
123
Cliffcrest
642100.5
4842406.3
14530
124
Kennedy Park
640101.0
4842859.5
17035
125
Ionview
639104.3
4843921.6
13030
126
Dorset Park
638530.2
4846563.3
24365
127
Bendale
640259.4
4846723.4
25490
128
Agincourt South-Malvern West
639525.8
4849844.6
21565
129
Agincourt North
639405.7
4851729.0
30160
130
Milliken
638702.7
4853405.6
26265
131
Rouge
645823.3
4853606.0
43180
132
Malvern
642963.3
4851584.7
44315
133
Centennial Scarborough
648771.2
4849367.1
12450
134
Highland Creek
646619.5
4850235.5
12845
135
Morningside
644258.2
4849253.5
17205
136
West Hill
646738.8
4847660.4
25635
137
Woburn
642562.5
4847484.6
52455
138
Eglinton East
641256.1
4844588.7
22385
139
Scarborough Village
643564.0
4844399.4
15585
140
Guildwood
645300.4
4845556.0
10025
The total population I scraped is within 0.1% of the official 2006 population of the city, so I'm good enough.
Duly impressed! Thanks!