forked from queise/Berlin_Maps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBerlin_dens_gmap.html
37 lines (35 loc) · 11.8 KB
/
Berlin_dens_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": {"nonselection_glyph": null, "data_source": {"type": "ColumnDataSource", "id": "1a6ad35c-9623-4dcc-9c6f-a1e930e131fc"}, "tags": [], "doc": "0d946f96-ba9f-4cbd-a2d2-ecfe5e55a124", "selection_glyph": null, "id": "961c88bb-eccd-430a-88d3-3d5d4dbddb49", "glyph": {"type": "Patches", "id": "847f2482-f9b6-4e41-95ae-4cec1ce85870"}}, "type": "GlyphRenderer", "id": "961c88bb-eccd-430a-88d3-3d5d4dbddb49"}, {"attributes": {"geometries": [], "tags": [], "doc": "0d946f96-ba9f-4cbd-a2d2-ecfe5e55a124", "id": "ef0bcfc1-94ef-469a-a786-3012c899f9b1"}, "type": "ToolEvents", "id": "ef0bcfc1-94ef-469a-a786-3012c899f9b1"}, {"attributes": {"plot": {"type": "GMapPlot", "id": "add093f0-d7a8-4387-800a-c8abfaac2b52"}, "tags": [], "doc": "0d946f96-ba9f-4cbd-a2d2-ecfe5e55a124", "id": "1e00d7d6-9214-42c8-b1b6-8bb605921248"}, "type": "PreviewSaveTool", "id": "1e00d7d6-9214-42c8-b1b6-8bb605921248"}, {"attributes": {"callback": null, "tags": [], "doc": "0d946f96-ba9f-4cbd-a2d2-ecfe5e55a124", "id": "984094e4-32ae-4fce-b046-d18a13933a45"}, "type": "Range1d", "id": "984094e4-32ae-4fce-b046-d18a13933a45"}, {"attributes": {"column_names": ["population", "area", "boroughsnames", "boroughs_xs", "density", "boroughs_colors", "boroughs_ys"], "tags": [], "doc": "0d946f96-ba9f-4cbd-a2d2-ecfe5e55a124", "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": ["#fcbba1", "#99000d", "#fcbba1", "#fcbba1", "#fb6a4a", "#fc9272", "#fcbba1", "#fee5d9", "#fee5d9", "#fee5d9", "#fc9272", "#fee5d9"], "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": "1a6ad35c-9623-4dcc-9c6f-a1e930e131fc"}, "type": "ColumnDataSource", "id": "1a6ad35c-9623-4dcc-9c6f-a1e930e131fc"}, {"attributes": {"tags": [], "doc": "0d946f96-ba9f-4cbd-a2d2-ecfe5e55a124", "id": "8ac5288d-edef-4788-8703-0f0a84791abc", "children": [{"type": "GMapPlot", "id": "add093f0-d7a8-4387-800a-c8abfaac2b52"}]}, "type": "PlotContext", "id": "8ac5288d-edef-4788-8703-0f0a84791abc"}, {"attributes": {"x_range": {"type": "Range1d", "id": "39e07861-98e3-44e3-a5a5-b4903a4a3074"}, "right": [], "map_options": {"lat": 52.521123, "map_type": "satellite", "lng": 13.407478, "zoom": 10}, "tags": [], "tools": [{"type": "PanTool", "id": "0d8ec4e4-5cf2-49aa-a4c3-d19a6eb5bb3f"}, {"type": "WheelZoomTool", "id": "8b84f649-73eb-4ca0-b713-32b6381dc37a"}, {"type": "BoxSelectTool", "id": "4d6915cc-99eb-4cfa-8177-ffcd929ff96b"}, {"type": "HoverTool", "id": "12aad002-4689-46a7-9006-901bf3d0bbc1"}, {"type": "ResetTool", "id": "5cd114a2-53e7-4800-9215-d865984c9e6b"}, {"type": "PreviewSaveTool", "id": "1e00d7d6-9214-42c8-b1b6-8bb605921248"}], "title": "", "extra_y_ranges": {}, "plot_width": 570, "renderers": [{"type": "GlyphRenderer", "id": "961c88bb-eccd-430a-88d3-3d5d4dbddb49"}], "extra_x_ranges": {}, "plot_height": 500, "tool_events": {"type": "ToolEvents", "id": "ef0bcfc1-94ef-469a-a786-3012c899f9b1"}, "above": [], "doc": "0d946f96-ba9f-4cbd-a2d2-ecfe5e55a124", "id": "add093f0-d7a8-4387-800a-c8abfaac2b52", "y_range": {"type": "Range1d", "id": "984094e4-32ae-4fce-b046-d18a13933a45"}, "below": [], "left": []}, "type": "GMapPlot", "id": "add093f0-d7a8-4387-800a-c8abfaac2b52"}, {"attributes": {"tooltips": [["Borough", "@boroughsnames"], ["Density (pop/km2)", "@density"], ["Area (km2)", "@area"]], "plot": {"type": "GMapPlot", "id": "add093f0-d7a8-4387-800a-c8abfaac2b52"}, "tags": [], "doc": "0d946f96-ba9f-4cbd-a2d2-ecfe5e55a124", "renderers": [], "callback": null, "names": [], "id": "12aad002-4689-46a7-9006-901bf3d0bbc1"}, "type": "HoverTool", "id": "12aad002-4689-46a7-9006-901bf3d0bbc1"}, {"attributes": {"callback": null, "tags": [], "doc": "0d946f96-ba9f-4cbd-a2d2-ecfe5e55a124", "id": "39e07861-98e3-44e3-a5a5-b4903a4a3074"}, "type": "Range1d", "id": "39e07861-98e3-44e3-a5a5-b4903a4a3074"}, {"attributes": {"plot": {"type": "GMapPlot", "id": "add093f0-d7a8-4387-800a-c8abfaac2b52"}, "dimensions": ["width", "height"], "tags": [], "doc": "0d946f96-ba9f-4cbd-a2d2-ecfe5e55a124", "id": "8b84f649-73eb-4ca0-b713-32b6381dc37a"}, "type": "WheelZoomTool", "id": "8b84f649-73eb-4ca0-b713-32b6381dc37a"}, {"attributes": {"plot": {"type": "GMapPlot", "id": "add093f0-d7a8-4387-800a-c8abfaac2b52"}, "dimensions": ["width", "height"], "tags": [], "doc": "0d946f96-ba9f-4cbd-a2d2-ecfe5e55a124", "renderers": [], "callback": null, "names": [], "id": "4d6915cc-99eb-4cfa-8177-ffcd929ff96b"}, "type": "BoxSelectTool", "id": "4d6915cc-99eb-4cfa-8177-ffcd929ff96b"}, {"attributes": {"plot": {"type": "GMapPlot", "id": "add093f0-d7a8-4387-800a-c8abfaac2b52"}, "dimensions": ["width", "height"], "tags": [], "doc": "0d946f96-ba9f-4cbd-a2d2-ecfe5e55a124", "id": "0d8ec4e4-5cf2-49aa-a4c3-d19a6eb5bb3f"}, "type": "PanTool", "id": "0d8ec4e4-5cf2-49aa-a4c3-d19a6eb5bb3f"}, {"attributes": {"line_color": {"value": "black"}, "line_width": {"value": 0.5}, "fill_color": {"field": "boroughs_colors"}, "tags": [], "doc": "0d946f96-ba9f-4cbd-a2d2-ecfe5e55a124", "fill_alpha": {"value": 0.5}, "xs": {"field": "boroughs_xs"}, "ys": {"field": "boroughs_ys"}, "id": "847f2482-f9b6-4e41-95ae-4cec1ce85870"}, "type": "Patches", "id": "847f2482-f9b6-4e41-95ae-4cec1ce85870"}, {"attributes": {"plot": {"type": "GMapPlot", "id": "add093f0-d7a8-4387-800a-c8abfaac2b52"}, "tags": [], "doc": "0d946f96-ba9f-4cbd-a2d2-ecfe5e55a124", "id": "5cd114a2-53e7-4800-9215-d865984c9e6b"}, "type": "ResetTool", "id": "5cd114a2-53e7-4800-9215-d865984c9e6b"}];
Bokeh.load_models(all_models);
var plots = [{'modeltype': 'PlotContext', 'elementid': '48817a17-7e3d-4054-8827-a703e57de3d8', 'modelid': '8ac5288d-edef-4788-8703-0f0a84791abc'}];
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="48817a17-7e3d-4054-8827-a703e57de3d8"></div>
</body>
</html>