-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathBerlin_pop_gmap.html
37 lines (35 loc) · 11.8 KB
/
Berlin_pop_gmap.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Bokeh Plot</title>
<link rel="stylesheet" href="http://cdn.pydata.org/bokeh/release/bokeh-0.9.3.min.css" type="text/css" />
<script type="text/javascript" src="http://cdn.pydata.org/bokeh/release/bokeh-0.9.3.min.js"></script>
<script type="text/javascript">
Bokeh.set_log_level("info");
</script>
<script type="text/javascript">
Bokeh.$(function() {
var all_models = [{"attributes": {"callback": null, "tags": [], "doc": "6f8d6e49-a4c0-42dd-b244-31d7e28ce3f6", "id": "ea11ab58-92e1-42f8-abdf-98f9eba0e39c"}, "type": "Range1d", "id": "ea11ab58-92e1-42f8-abdf-98f9eba0e39c"}, {"attributes": {"column_names": ["population", "area", "boroughsnames", "boroughs_xs", "density", "boroughs_colors", "boroughs_ys"], "tags": [], "doc": "6f8d6e49-a4c0-42dd-b244-31d7e28ce3f6", "selected": {"2d": {"indices": []}, "1d": {"indices": []}, "0d": {"indices": [], "flag": false}}, "callback": null, "data": {"area": [64.72, 20.16, 52.29, 61.74, 39.47, 44.93, 103.01, 89.46, 91.91, 102.5, 53.09, 168.42], "boroughsnames": ["Charlottenburg-Wilmersdorf", "Friedrichshain-Kreuzberg", "Lichtenberg", "Marzahn-Hellersdorf", "Mitte", "Neukoelln", "Pankow", "Reinickendorf", "Spandau", "Steglitz-Zehlendorf", "Tempelhof-Schoeneberg", "Treptow-Koepenick"], "boroughs_xs": [[13.3219, 13.2927, 13.2567, 13.2365, 13.2129, 13.1904, 13.1916, 13.2129, 13.2253, 13.2848, 13.2747, 13.3062, 13.3287, 13.3185, 13.3242, 13.3455, 13.3399, 13.323, 13.3219], [13.4096, 13.3792, 13.3713, 13.3882, 13.4174, 13.4309, 13.4242, 13.4444, 13.4612, 13.477, 13.4826, 13.4747, 13.4938, 13.4556, 13.4433, 13.4287, 13.4096], [13.4938, 13.4747, 13.4826, 13.477, 13.4646, 13.4725, 13.4983, 13.4893, 13.4882, 13.5084, 13.5455, 13.5691, 13.5309, 13.5376, 13.5208, 13.523, 13.5421, 13.5545, 13.5331, 13.4938], [13.5545, 13.5421, 13.523, 13.5208, 13.5376, 13.532, 13.5691, 13.5882, 13.5893, 13.641, 13.6309, 13.6612, 13.6275, 13.6174, 13.5848, 13.5545], [13.3713, 13.3455, 13.3242, 13.3197, 13.3287, 13.3062, 13.3365, 13.3702, 13.3938, 13.4073, 13.4242, 13.4309, 13.4174, 13.3893, 13.3713], [13.4208, 13.4084, 13.4062, 13.4264, 13.4096, 13.4287, 13.4433, 13.4713, 13.4815, 13.4635, 13.4657, 13.523, 13.5219, 13.4848, 13.468, 13.4208], [13.4242, 13.4073, 13.3938, 13.3545, 13.377, 13.3837, 13.3713, 13.3994, 13.4343, 13.45, 13.4815, 13.4579, 13.4893, 13.4938, 13.5253, 13.5242, 13.5084, 13.5084, 13.4882, 13.4893, 13.4983, 13.4725, 13.4635, 13.477, 13.4612, 13.4444, 13.4242], [13.2747, 13.2579, 13.2309, 13.2208, 13.2073, 13.223, 13.268, 13.2669, 13.286, 13.2938, 13.3118, 13.3118, 13.341, 13.3713, 13.3837, 13.377, 13.3534, 13.3938, 13.3702, 13.3365, 13.3062, 13.2747], [13.1904, 13.177, 13.1522, 13.1242, 13.1118, 13.1208, 13.1702, 13.1455, 13.1208, 13.1343, 13.15, 13.1534, 13.1343, 13.1612, 13.2208, 13.2309, 13.2567, 13.2747, 13.286, 13.2264, 13.214, 13.1927, 13.1904], [13.3455, 13.314, 13.2983, 13.2736, 13.2534, 13.2489, 13.2287, 13.2073, 13.1624, 13.1691, 13.1399, 13.1152, 13.1118, 13.0927, 13.0961, 13.1096, 13.1242, 13.1522, 13.177, 13.1904, 13.2129, 13.2365, 13.2567, 13.2927, 13.3219, 13.341, 13.3601, 13.3747, 13.3455], [13.4208, 13.4331, 13.423, 13.3871, 13.3837, 13.3455, 13.3747, 13.3601, 13.341, 13.3219, 13.323, 13.3399, 13.3455, 13.3713, 13.3792, 13.4096, 13.4264, 13.4062, 13.4084, 13.4208], [13.5219, 13.523, 13.4657, 13.4635, 13.4815, 13.4713, 13.4433, 13.4556, 13.4938, 13.5331, 13.5545, 13.5848, 13.6174, 13.65, 13.6972, 13.7096, 13.7331, 13.7635, 13.7354, 13.7421, 13.6961, 13.7017, 13.677, 13.6534, 13.641, 13.6534, 13.6343, 13.614, 13.5961, 13.5399, 13.5219]], "density": [4.878, 13.187, 4.952, 4.046, 8.272, 6.804, 3.476, 2.712, 2.441, 2.818, 6.256, 1.406], "boroughs_colors": ["#6baed6", "#bdd7e7", "#bdd7e7", "#eff3ff", "#3182bd", "#6baed6", "#08519c", "#eff3ff", "#eff3ff", "#bdd7e7", "#3182bd", "#eff3ff"], "boroughs_ys": [[52.4699, 52.474, 52.4692, 52.4747, 52.4734, 52.474, 52.4955, 52.5073, 52.5308, 52.5377, 52.5536, 52.5536, 52.5467, 52.537, 52.526, 52.5087, 52.481, 52.481, 52.4699], [52.4886, 52.49, 52.5024, 52.51, 52.5087, 52.5149, 52.5287, 52.5329, 52.5239, 52.5246, 52.5149, 52.5045, 52.4913, 52.4997, 52.4927, 52.4948, 52.4886], [52.4913, 52.5045, 52.5149, 52.5246, 52.5329, 52.5522, 52.5557, 52.5709, 52.5896, 52.6007, 52.5938, 52.5772, 52.5612, 52.5433, 52.5384, 52.5183, 52.5149, 52.4768, 52.472, 52.4913], [52.4768, 52.5149, 52.5183, 52.5384, 52.5439, 52.5612, 52.5772, 52.5737, 52.5557, 52.546, 52.5336, 52.5301, 52.4969, 52.4747, 52.4824, 52.4768], [52.5024, 52.5087, 52.526, 52.537, 52.5467, 52.5536, 52.5682, 52.5633, 52.5716, 52.5349, 52.5287, 52.5156, 52.5087, 52.51, 52.5024], [52.4118, 52.4159, 52.427, 52.4602, 52.4886, 52.4948, 52.4927, 52.481, 52.4637, 52.4623, 52.4526, 52.4291, 52.4048, 52.3972, 52.4215, 52.4118], [52.5287, 52.5349, 52.5716, 52.5931, 52.6055, 52.6173, 52.6304, 52.654, 52.6415, 52.654, 52.6602, 52.6685, 52.6789, 52.6609, 52.6478, 52.6339, 52.6256, 52.6007, 52.5896, 52.5709, 52.5557, 52.5529, 52.5329, 52.5246, 52.5239, 52.5329, 52.5287], [52.5536, 52.5536, 52.5668, 52.5917, 52.6083, 52.6325, 52.6332, 52.6436, 52.6464, 52.6644, 52.6505, 52.6339, 52.6284, 52.6304, 52.6173, 52.6055, 52.5931, 52.5716, 52.5633, 52.5682, 52.5536, 52.5536], [52.474, 52.4595, 52.4471, 52.4443, 52.4554, 52.4782, 52.5135, 52.5225, 52.5211, 52.5592, 52.5585, 52.5862, 52.5896, 52.6021, 52.5917, 52.5668, 52.5536, 52.5536, 52.537, 52.5301, 52.5066, 52.4948, 52.474], [52.4125, 52.4021, 52.418, 52.4069, 52.4069, 52.4221, 52.4235, 52.418, 52.4069, 52.3979, 52.3993, 52.4069, 52.4138, 52.4166, 52.427, 52.4291, 52.4443, 52.4471, 52.4595, 52.474, 52.4734, 52.4747, 52.4692, 52.474, 52.4699, 52.4685, 52.4561, 52.4311, 52.4125], [52.4118, 52.3882, 52.3792, 52.3785, 52.391, 52.4125, 52.4311, 52.4561, 52.4685, 52.4699, 52.481, 52.481, 52.5087, 52.5024, 52.49, 52.4886, 52.4602, 52.427, 52.4159, 52.4118], [52.4048, 52.4291, 52.4526, 52.4623, 52.4637, 52.481, 52.4927, 52.4997, 52.4913, 52.472, 52.4768, 52.4824, 52.4747, 52.4796, 52.4664, 52.4692, 52.4547, 52.4471, 52.4208, 52.4035, 52.3882, 52.3702, 52.3689, 52.3391, 52.3481, 52.3682, 52.3813, 52.3765, 52.3952, 52.3917, 52.4048]], "population": [319.628, 268.225, 259.881, 248.264, 332.919, 310.283, 366.441, 240.454, 223.962, 293.989, 335.06, 241.335]}, "id": "0e208b7c-b222-4a98-a24e-f061b5cdb3ae"}, "type": "ColumnDataSource", "id": "0e208b7c-b222-4a98-a24e-f061b5cdb3ae"}, {"attributes": {"plot": {"type": "GMapPlot", "id": "57f8635b-e968-4908-8b53-74c3b544e828"}, "dimensions": ["width", "height"], "tags": [], "doc": "6f8d6e49-a4c0-42dd-b244-31d7e28ce3f6", "renderers": [], "callback": null, "names": [], "id": "2b082709-6303-4afa-9680-480831f682f8"}, "type": "BoxSelectTool", "id": "2b082709-6303-4afa-9680-480831f682f8"}, {"attributes": {"x_range": {"type": "Range1d", "id": "705a49b1-fb81-4b15-914d-30ab0c7d43b7"}, "right": [], "map_options": {"lat": 52.521123, "map_type": "terrain", "lng": 13.407478, "zoom": 10}, "tags": [], "tools": [{"type": "PanTool", "id": "b17b5e00-1f7f-4131-87e5-1d7b9083fae5"}, {"type": "WheelZoomTool", "id": "debf4425-d2bd-4360-9e9e-1de28b83ceda"}, {"type": "BoxSelectTool", "id": "2b082709-6303-4afa-9680-480831f682f8"}, {"type": "HoverTool", "id": "05ce8ef9-036e-464a-a598-a21864dbb4b9"}, {"type": "ResetTool", "id": "5fc9310c-b292-47ee-944b-d659e1d58809"}, {"type": "PreviewSaveTool", "id": "60dd89a2-5ac6-4801-b344-832a316ed394"}], "title": "", "extra_y_ranges": {}, "plot_width": 570, "renderers": [{"type": "GlyphRenderer", "id": "7287f962-7ab7-4bf9-817f-4254cb2f1ec1"}], "extra_x_ranges": {}, "plot_height": 500, "tool_events": {"type": "ToolEvents", "id": "5f38941f-90a3-47e5-8eaa-5cb16cc1fe32"}, "above": [], "doc": "6f8d6e49-a4c0-42dd-b244-31d7e28ce3f6", "id": "57f8635b-e968-4908-8b53-74c3b544e828", "y_range": {"type": "Range1d", "id": "ea11ab58-92e1-42f8-abdf-98f9eba0e39c"}, "below": [], "left": []}, "type": "GMapPlot", "id": "57f8635b-e968-4908-8b53-74c3b544e828"}, {"attributes": {"plot": {"type": "GMapPlot", "id": "57f8635b-e968-4908-8b53-74c3b544e828"}, "dimensions": ["width", "height"], "tags": [], "doc": "6f8d6e49-a4c0-42dd-b244-31d7e28ce3f6", "id": "debf4425-d2bd-4360-9e9e-1de28b83ceda"}, "type": "WheelZoomTool", "id": "debf4425-d2bd-4360-9e9e-1de28b83ceda"}, {"attributes": {"tooltips": [["Borough", "@boroughsnames"], ["Population", "@population"], ["Area (km2)", "@area"]], "plot": {"type": "GMapPlot", "id": "57f8635b-e968-4908-8b53-74c3b544e828"}, "tags": [], "doc": "6f8d6e49-a4c0-42dd-b244-31d7e28ce3f6", "renderers": [], "callback": null, "names": [], "id": "05ce8ef9-036e-464a-a598-a21864dbb4b9"}, "type": "HoverTool", "id": "05ce8ef9-036e-464a-a598-a21864dbb4b9"}, {"attributes": {"plot": {"type": "GMapPlot", "id": "57f8635b-e968-4908-8b53-74c3b544e828"}, "dimensions": ["width", "height"], "tags": [], "doc": "6f8d6e49-a4c0-42dd-b244-31d7e28ce3f6", "id": "b17b5e00-1f7f-4131-87e5-1d7b9083fae5"}, "type": "PanTool", "id": "b17b5e00-1f7f-4131-87e5-1d7b9083fae5"}, {"attributes": {"plot": {"type": "GMapPlot", "id": "57f8635b-e968-4908-8b53-74c3b544e828"}, "tags": [], "doc": "6f8d6e49-a4c0-42dd-b244-31d7e28ce3f6", "id": "60dd89a2-5ac6-4801-b344-832a316ed394"}, "type": "PreviewSaveTool", "id": "60dd89a2-5ac6-4801-b344-832a316ed394"}, {"attributes": {"geometries": [], "tags": [], "doc": "6f8d6e49-a4c0-42dd-b244-31d7e28ce3f6", "id": "5f38941f-90a3-47e5-8eaa-5cb16cc1fe32"}, "type": "ToolEvents", "id": "5f38941f-90a3-47e5-8eaa-5cb16cc1fe32"}, {"attributes": {"plot": {"type": "GMapPlot", "id": "57f8635b-e968-4908-8b53-74c3b544e828"}, "tags": [], "doc": "6f8d6e49-a4c0-42dd-b244-31d7e28ce3f6", "id": "5fc9310c-b292-47ee-944b-d659e1d58809"}, "type": "ResetTool", "id": "5fc9310c-b292-47ee-944b-d659e1d58809"}, {"attributes": {"callback": null, "tags": [], "doc": "6f8d6e49-a4c0-42dd-b244-31d7e28ce3f6", "id": "705a49b1-fb81-4b15-914d-30ab0c7d43b7"}, "type": "Range1d", "id": "705a49b1-fb81-4b15-914d-30ab0c7d43b7"}, {"attributes": {"nonselection_glyph": null, "data_source": {"type": "ColumnDataSource", "id": "0e208b7c-b222-4a98-a24e-f061b5cdb3ae"}, "tags": [], "doc": "6f8d6e49-a4c0-42dd-b244-31d7e28ce3f6", "selection_glyph": null, "id": "7287f962-7ab7-4bf9-817f-4254cb2f1ec1", "glyph": {"type": "Patches", "id": "87da1d03-9a04-405e-9930-8f7b80c3d205"}}, "type": "GlyphRenderer", "id": "7287f962-7ab7-4bf9-817f-4254cb2f1ec1"}, {"attributes": {"tags": [], "doc": "6f8d6e49-a4c0-42dd-b244-31d7e28ce3f6", "id": "c4aadad0-12ae-4134-9e2e-b54a8834ac1b", "children": [{"type": "GMapPlot", "id": "57f8635b-e968-4908-8b53-74c3b544e828"}]}, "type": "PlotContext", "id": "c4aadad0-12ae-4134-9e2e-b54a8834ac1b"}, {"attributes": {"line_color": {"value": "black"}, "line_width": {"value": 0.5}, "fill_color": {"field": "boroughs_colors"}, "tags": [], "doc": "6f8d6e49-a4c0-42dd-b244-31d7e28ce3f6", "fill_alpha": {"value": 0.7}, "xs": {"field": "boroughs_xs"}, "ys": {"field": "boroughs_ys"}, "id": "87da1d03-9a04-405e-9930-8f7b80c3d205"}, "type": "Patches", "id": "87da1d03-9a04-405e-9930-8f7b80c3d205"}];
Bokeh.load_models(all_models);
var plots = [{'modeltype': 'PlotContext', 'elementid': '4ed7db21-608a-4b82-877d-e1c19034e86e', 'modelid': 'c4aadad0-12ae-4134-9e2e-b54a8834ac1b'}];
for (idx in plots) {
var plot = plots[idx];
var model = Bokeh.Collections(plot.modeltype).get(plot.modelid);
Bokeh.logger.info('Realizing plot:')
Bokeh.logger.info(' - modeltype: ' + plot.modeltype);
Bokeh.logger.info(' - modelid: ' + plot.modelid);
Bokeh.logger.info(' - elementid: ' + plot.elementid);
var view = new model.default_view({
model: model,
el: '#' + plot.elementid
});
Bokeh.index[plot.modelid] = view;
}
});
</script>
</head>
<body>
<div class="plotdiv" id="4ed7db21-608a-4b82-877d-e1c19034e86e"></div>
</body>
</html>