-
Notifications
You must be signed in to change notification settings - Fork 0
/
top_locations.html
125 lines (100 loc) · 36.5 KB
/
top_locations.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>top locations plot</title>
<link rel="stylesheet" href="https://cdn.pydata.org/bokeh/release/bokeh-0.12.3.min.css" type="text/css" />
<script type="text/javascript" src="https://cdn.pydata.org/bokeh/release/bokeh-0.12.3.min.js"></script>
<script type="text/javascript">
Bokeh.set_log_level("info");
</script>
<script type="text/javascript">
(function outer(modules, cache, entry) {
if (typeof Bokeh !== "undefined") {
var _ = Bokeh._;
for (var name in modules) {
Bokeh.require.modules[name] = modules[name];
}
for (var i = 0; i < entry.length; i++) {
var exports = Bokeh.require(entry[i]);
if (_.isObject(exports.models)) {
Bokeh.Models.register_locations(exports.models);
}
_.extend(Bokeh, _.omit(exports, "models"));
}
} else {
throw new Error("Cannot find Bokeh. You have to load it prior to loading plugins.");
}
})
({
"custom/main": [function(require, module, exports) {
module.exports = {
models: {
"FixedTickFormatter": require("custom/fixed_tick_formatter")
}
};
}, {}],
"custom/fixed_tick_formatter": [function(require, module, exports) {
var FixedTickFormatter, Model, _, p,
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;
_ = require("underscore");
Model = require("model");
p = require("core/properties");
FixedTickFormatter = (function(superClass) {
extend(FixedTickFormatter, superClass);
function FixedTickFormatter() {
return FixedTickFormatter.__super__.constructor.apply(this, arguments);
}
FixedTickFormatter.prototype.type = 'FixedTickFormatter';
FixedTickFormatter.prototype.doFormat = function(ticks) {
var labels, tick;
labels = this.get("labels");
return (function() {
var i, len, ref, results;
results = [];
for (i = 0, len = ticks.length; i < len; i++) {
tick = ticks[i];
results.push((ref = labels[tick]) != null ? ref : "");
}
return results;
})();
};
FixedTickFormatter.define({
labels: [p.Any]
});
return FixedTickFormatter;
})(Model);
module.exports = {
Model: FixedTickFormatter
};
}, {}]
}, {}, ["custom/main"]);
</script>
<style>
html {
width: 100%;
height: 100%;
}
body {
width: 90%;
height: 100%;
margin: auto;
}
</style>
</head>
<body>
<div class="bk-root">
<div class="plotdiv" id="32410101-5925-4ff3-a50d-0b4d2b7cf24f"></div>
</div>
<script type="text/javascript">
Bokeh.$(function() {
Bokeh.safely(function() {
var docs_json = {"18ceff98-e204-4337-af1c-45878b42744f":{"roots":{"references":[{"attributes":{"callback":null,"column_names":["color","index","pct jobs at location","location"],"data":{"color":["#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de"],"index":[0,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],"location":["New York, NY","San Francisco, CA","Boston, MA","","Seattle, WA","Chicago, IL","San Mateo, CA","Redwood City, CA","San Jose, CA","Minnetonka, MN","Chesterfield, MO","Washington, DC","Portland, OR","Dearborn, MI","Santa Clara, CA","Los Angeles, CA","Pittsburgh, PA","Palo Alto","Cambridge, MA","Irving, TX","Austin, TX","Berkeley, CA","Westminster, CO","New York City, NY","Sunnyvale, CA","Bridgewater, NJ","Cupertino, CA","Palo Alto, CA","Bellevue, WA","Creve Coeur, MO"],"pct jobs at location":[12.0,6.0,6.0,3.0,3.0,3.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0]}},"id":"dbcd4d61-d719-4e68-b3c7-8397028abbdb","type":"ColumnDataSource"},{"attributes":{},"id":"e91bb406-4bd7-4bd4-942b-bd2b0e5e2e45","type":"BasicTicker"},{"attributes":{"args":{"source":{"id":"dbcd4d61-d719-4e68-b3c7-8397028abbdb","type":"ColumnDataSource"},"xr":{"id":"6a5c56e3-fc4f-43ff-ba63-c72ff8e56fe7","type":"Range1d"}},"code":"\n // JavaScript code goes here\n\n // load jquery if not already loaded\n // Anonymous \"self-invoking\" function\n (function() {\n test2 = cb_obj;\n var bokeh_data = source['data'];\n var data_locs = bokeh_data['location'];\n bokeh_locs_list = data_locs;\n // Load the script\n var script = document.createElement(\"SCRIPT\");\n script.src = 'https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js';\n script.type = 'text/javascript';\n document.getElementsByTagName(\"head\")[0].appendChild(script);\n\n // Poll for jQuery to come into existance\n var checkReady = function(callback) {\n if (window.jQuery) {\n callback(jQuery);\n }\n else {\n window.setTimeout(function() { checkReady(callback); }, 100);\n }\n };\n\n // Start polling...\n checkReady(function($) {\n // Use $ here...\n var cur_loc = cb_obj['data']['locations'];\n selected_loc = cb_obj; // need to declare selected as var earlier,\n // use selected['selected']['1d'].indices to get selected elements\n var arrpos = $.inArray(cur_loc, bokeh_locs_list);\n var datapos = $.inArray(cur_loc, data_locs);\n var loc = cb_obj['data']['location'];\n $('#locs_list').empty();\n var selected_idxs = selected_loc['selected']['1d'].indices;\n for (var i = 0; i < selected_idxs.length; i++) {\n var cur_loc = bokeh_locs_list[selected_idxs[i]];\n $('#locs_list').append('<li class=\"list-group-item\" style=\"color:#000;\" id=\"' + cur_loc + '\">' + cur_loc + '</li>');\n locations.push(cur_loc);\n }\n source.trigger('change');\n });\n })();\n\n console.log(cb_obj);\n console.log(cb_obj['data']['skill']);\n\n // models passed as args are automagically available\n // xr.start = a;\n // xr.end = b;\n // listen for click in div, and clear skills list accordingly\n if (click_set == false) {\n $('#locs_plot').click(fn);\n click_set = true;\n }\n\n "},"id":"3e442eb9-239f-4e2c-99f0-14ff2675b611","type":"CustomJS"},{"attributes":{"fill_color":{"field":"color"},"line_color":{"field":"color"},"top":{"field":"pct jobs at location"},"width":{"value":0.9},"x":{"field":"index"}},"id":"ee760add-4fb0-4aee-8537-efdb52767fdf","type":"VBar"},{"attributes":{"grid_line_color":{"value":null},"plot":{"id":"0670c37d-7132-40d1-9671-9e00ee3aa3d4","subtype":"Figure","type":"Plot"},"ticker":{"id":"e8b0ffd0-df20-4a68-8583-4972e8f56c6c","type":"BasicTicker"}},"id":"c1e64c13-286a-48b8-a284-08e8484ab2de","type":"Grid"},{"attributes":{"data_source":{"id":"a3a24e92-79d3-421d-aaeb-19eba5b76c98","type":"ColumnDataSource"},"glyph":{"id":"87b52dea-49b8-4060-84e9-ff6abb5eb70a","type":"VBar"},"hover_glyph":null,"nonselection_glyph":{"id":"662ced07-8c0a-4f49-81e2-a13dccfe1705","type":"VBar"},"selection_glyph":null},"id":"138aaaba-58ff-4f2f-937c-bc7852ff1c57","type":"GlyphRenderer"},{"attributes":{"active_drag":"auto","active_scroll":"auto","active_tap":"auto","tools":[{"id":"0add64f1-d755-48ce-807b-7fece8ebe87f","type":"TapTool"}]},"id":"fe577468-6b5c-4ad7-ad8b-6452cf47d9db","type":"Toolbar"},{"attributes":{"labels":{"0":"CA","1":"NY","10":"PA","11":"MD","12":"MI","13":"OR","14":"DC","15":"NC","16":"FL","17":"CO","18":"GA","19":"LA","2":"MA","20":"OH","21":"NE","22":"NM","23":"TN","24":"WI","25":"IN","26":"AZ","27":"KY","28":"UT","29":"DE","3":"VA","4":"TX","5":"IL","6":"NJ","7":"WA","8":"MO","9":"MN"}},"id":"305155b8-ae17-4b4e-b620-6ed9e15099e1","type":"FixedTickFormatter"},{"attributes":{"fill_color":{"field":"color"},"line_color":{"field":"color"},"top":{"field":"pct jobs at location"},"width":{"value":0.9},"x":{"field":"index"}},"id":"4654bb5d-4be9-499e-877d-8326bf6465ce","type":"VBar"},{"attributes":{"callback":null,"column_names":["color","index","pct jobs at location","location"],"data":{"color":["#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de"],"index":[0,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],"location":["New York, NY","San Francisco, CA","Boston, MA","","Seattle, WA","Chicago, IL","San Mateo, CA","Redwood City, CA","San Jose, CA","Minnetonka, MN","Chesterfield, MO","Washington, DC","Portland, OR","Dearborn, MI","Santa Clara, CA","Los Angeles, CA","Pittsburgh, PA","Palo Alto","Cambridge, MA","Irving, TX","Austin, TX","Berkeley, CA","Westminster, CO","New York City, NY","Sunnyvale, CA","Bridgewater, NJ","Cupertino, CA","Palo Alto, CA","Bellevue, WA","Creve Coeur, MO"],"pct jobs at location":[11.507402422611037,6.123822341857335,5.854643337819651,2.9609690444145356,2.759084791386272,2.557200538358008,2.220726783310902,2.220726783310902,2.1534320323014806,2.0861372812920593,1.9515477792732168,1.9515477792732168,1.8842530282637955,1.6150740242261103,1.6150740242261103,1.6150740242261103,1.547779273216689,1.4131897711978465,1.4131897711978465,1.3458950201884252,1.2113055181695829,1.1440107671601614,1.0767160161507403,1.0767160161507403,1.0094212651413188,0.8748317631224763,0.8748317631224763,0.8075370121130552,0.8075370121130552,0.8075370121130552]}},"id":"3b8db75d-7ed0-434a-a365-ce672cbaf385","type":"ColumnDataSource"},{"attributes":{"grid_line_color":{"value":null},"plot":{"id":"fc32cf8a-63f2-48a3-89e7-2e4ae341f0aa","subtype":"Figure","type":"Plot"},"ticker":{"id":"46922ca1-644c-47f8-9f78-1bbf50517be6","type":"BasicTicker"}},"id":"809f6623-376b-4fef-a9a4-b460d918d6ff","type":"Grid"},{"attributes":{"dimension":1,"grid_line_color":{"value":null},"plot":{"id":"fc32cf8a-63f2-48a3-89e7-2e4ae341f0aa","subtype":"Figure","type":"Plot"},"ticker":{"id":"74e040d4-ee1f-4784-8f77-474286c4e1d2","type":"BasicTicker"}},"id":"36a79a75-010a-4812-99b9-2f2260b10144","type":"Grid"},{"attributes":{"fill_color":{"field":"color"},"line_color":{"field":"color"},"top":{"field":"pct jobs in state"},"width":{"value":0.9},"x":{"field":"index"}},"id":"87b52dea-49b8-4060-84e9-ff6abb5eb70a","type":"VBar"},{"attributes":{"dimension":1,"grid_line_color":{"value":null},"plot":{"id":"006dff7e-17fe-4f75-8794-91e8803127e9","subtype":"Figure","type":"Plot"},"ticker":{"id":"e91bb406-4bd7-4bd4-942b-bd2b0e5e2e45","type":"BasicTicker"}},"id":"74537d44-4972-4180-86aa-af5e6c5007b4","type":"Grid"},{"attributes":{"callback":{"id":"3e442eb9-239f-4e2c-99f0-14ff2675b611","type":"CustomJS"},"plot":{"id":"918f512d-ebed-48e0-a321-384bd41b7335","subtype":"Figure","type":"Plot"}},"id":"0add64f1-d755-48ce-807b-7fece8ebe87f","type":"TapTool"},{"attributes":{"labels":{"0":"New York, NY","1":"San Francisco, CA","10":"Chesterfield, MO","11":"Washington, DC","12":"Portland, OR","13":"Dearborn, MI","14":"Santa Clara, CA","15":"Los Angeles, CA","16":"Pittsburgh, PA","17":"Palo Alto","18":"Cambridge, MA","19":"Irving, TX","2":"Boston, MA","20":"Austin, TX","21":"Berkeley, CA","22":"Westminster, CO","23":"New York City, NY","24":"Sunnyvale, CA","25":"Bridgewater, NJ","26":"Cupertino, CA","27":"Palo Alto, CA","28":"Bellevue, WA","29":"Creve Coeur, MO","3":"","4":"Seattle, WA","5":"Chicago, IL","6":"San Mateo, CA","7":"Redwood City, CA","8":"San Jose, CA","9":"Minnetonka, MN"}},"id":"9cf63af7-05cc-40b3-945c-b4a6adf1cfcf","type":"FixedTickFormatter"},{"attributes":{"desired_num_ticks":30,"num_minor_ticks":0},"id":"46922ca1-644c-47f8-9f78-1bbf50517be6","type":"BasicTicker"},{"attributes":{"plot":null,"text":"Top locations for data science","text_font_size":{"value":"15pt"}},"id":"2ad60d2d-c9bd-4ade-980d-4ade1328e3c2","type":"Title"},{"attributes":{"data_source":{"id":"28fcb0db-b8e0-4714-9dcf-87440be2561c","type":"ColumnDataSource"},"glyph":{"id":"ee760add-4fb0-4aee-8537-efdb52767fdf","type":"VBar"},"hover_glyph":null,"nonselection_glyph":{"id":"b951bc11-c279-4088-91f0-a954e9a1c036","type":"VBar"},"selection_glyph":null},"id":"8167a53a-6a57-4ce6-8bf7-ba2965b9d730","type":"GlyphRenderer"},{"attributes":{"callback":{"id":"608dd5bc-0bfa-47ca-af7b-5346c32c8822","type":"CustomJS"},"plot":{"id":"006dff7e-17fe-4f75-8794-91e8803127e9","subtype":"Figure","type":"Plot"}},"id":"19517bb5-8bb6-46e4-b510-666978532bae","type":"TapTool"},{"attributes":{"callback":null,"end":29.5,"start":-0.5},"id":"3a42534a-f943-491f-9810-225d137518fa","type":"Range1d"},{"attributes":{"desired_num_ticks":30,"num_minor_ticks":0},"id":"4f8d5d5e-82d7-4362-a861-21ea7b73bb57","type":"BasicTicker"},{"attributes":{"axis_label":"percent of jobs at location","axis_label_text_font_size":{"value":"15pt"},"formatter":{"id":"466ce2f8-a889-4f77-aa2f-96f35b7a7def","type":"BasicTickFormatter"},"plot":{"id":"918f512d-ebed-48e0-a321-384bd41b7335","subtype":"Figure","type":"Plot"},"ticker":{"id":"8d6337c2-7daf-4add-9c9a-506b86c3c7d9","type":"BasicTicker"}},"id":"db0bb318-0a6c-4335-8bcc-471d8022b56c","type":"LinearAxis"},{"attributes":{"callback":null,"end":20.0},"id":"3e9c2485-f8af-45a0-89f8-8ed789876113","type":"Range1d"},{"attributes":{"below":[{"id":"567e6dfd-52fb-438d-ba32-9aeab88f7aba","type":"LinearAxis"}],"left":[{"id":"bc4dedc6-7726-4d7c-9b73-e377b647810d","type":"LinearAxis"}],"plot_height":500,"plot_width":500,"renderers":[{"id":"567e6dfd-52fb-438d-ba32-9aeab88f7aba","type":"LinearAxis"},{"id":"c1e64c13-286a-48b8-a284-08e8484ab2de","type":"Grid"},{"id":"bc4dedc6-7726-4d7c-9b73-e377b647810d","type":"LinearAxis"},{"id":"810995c2-6ca7-4886-a33c-4a76066a4c63","type":"Grid"},{"id":"4b3a9db8-8767-4bd8-b75c-a80a14961014","type":"GlyphRenderer"}],"title":{"id":"9b9f128a-dbf7-4e3e-ae12-44ee3b2ed8ab","type":"Title"},"tool_events":{"id":"b72744cf-a461-4f1c-b1a6-eb3b504a351f","type":"ToolEvents"},"toolbar":{"id":"375c9ac7-993b-4145-95a8-2b4c4a7e9980","type":"Toolbar"},"x_range":{"id":"3a42534a-f943-491f-9810-225d137518fa","type":"Range1d"},"y_range":{"id":"6d517640-1c49-4f7b-ba35-de126a816749","type":"Range1d"}},"id":"0670c37d-7132-40d1-9671-9e00ee3aa3d4","subtype":"Figure","type":"Plot"},{"attributes":{"axis_label_text_font_size":{"value":"15pt"},"formatter":{"id":"305155b8-ae17-4b4e-b620-6ed9e15099e1","type":"FixedTickFormatter"},"major_label_orientation":89.0,"plot":{"id":"fc32cf8a-63f2-48a3-89e7-2e4ae341f0aa","subtype":"Figure","type":"Plot"},"ticker":{"id":"46922ca1-644c-47f8-9f78-1bbf50517be6","type":"BasicTicker"}},"id":"8d7f4d08-429b-4ef5-b39d-0638cff9014a","type":"LinearAxis"},{"attributes":{},"id":"8d6337c2-7daf-4add-9c9a-506b86c3c7d9","type":"BasicTicker"},{"attributes":{"callback":null,"end":30.0},"id":"d692b8aa-6a17-46a3-b8fc-3dfe2043ebd8","type":"Range1d"},{"attributes":{"fill_alpha":{"value":0.1},"fill_color":{"value":"#1f77b4"},"line_alpha":{"value":0.1},"line_color":{"value":"#1f77b4"},"top":{"field":"pct jobs at location"},"width":{"value":0.9},"x":{"field":"index"}},"id":"4d6a1d2f-4f14-44f3-8ded-9e11dec73a22","type":"VBar"},{"attributes":{"callback":null,"end":29.5,"start":-0.5},"id":"6a5c56e3-fc4f-43ff-ba63-c72ff8e56fe7","type":"Range1d"},{"attributes":{"fill_alpha":{"value":0.1},"fill_color":{"value":"#1f77b4"},"line_alpha":{"value":0.1},"line_color":{"value":"#1f77b4"},"top":{"field":"pct jobs at location"},"width":{"value":0.9},"x":{"field":"index"}},"id":"8a539b22-c731-434a-a7f8-61b19605af98","type":"VBar"},{"attributes":{"fill_color":{"field":"color"},"line_color":{"field":"color"},"top":{"field":"pct jobs at location"},"width":{"value":0.9},"x":{"field":"index"}},"id":"5c81e6a7-06ab-4ad2-8b03-9590984552d0","type":"VBar"},{"attributes":{},"id":"4925b04e-bd1f-4a7d-b009-e6db837b012e","type":"ToolEvents"},{"attributes":{},"id":"0ff82d50-f6aa-4192-8a22-c1cb96366514","type":"BasicTickFormatter"},{"attributes":{},"id":"d54f9c90-ad78-4ecd-af6a-6d9c04e7f5be","type":"ToolEvents"},{"attributes":{},"id":"cd580967-4b47-4154-ae66-cf8cf2d8fa5b","type":"BasicTickFormatter"},{"attributes":{},"id":"466ce2f8-a889-4f77-aa2f-96f35b7a7def","type":"BasicTickFormatter"},{"attributes":{"args":{"source":{"id":"3b8db75d-7ed0-434a-a365-ce672cbaf385","type":"ColumnDataSource"},"xr":{"id":"3a42534a-f943-491f-9810-225d137518fa","type":"Range1d"}},"code":"\n // JavaScript code goes here\n\n // load jquery if not already loaded\n // Anonymous \"self-invoking\" function\n (function() {\n test2 = cb_obj;\n var bokeh_data = source['data'];\n var data_locs = bokeh_data['location'];\n bokeh_locs_list = data_locs;\n // Load the script\n var script = document.createElement(\"SCRIPT\");\n script.src = 'https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js';\n script.type = 'text/javascript';\n document.getElementsByTagName(\"head\")[0].appendChild(script);\n\n // Poll for jQuery to come into existance\n var checkReady = function(callback) {\n if (window.jQuery) {\n callback(jQuery);\n }\n else {\n window.setTimeout(function() { checkReady(callback); }, 100);\n }\n };\n\n // Start polling...\n checkReady(function($) {\n // Use $ here...\n var cur_loc = cb_obj['data']['locations'];\n selected_loc = cb_obj; // need to declare selected as var earlier,\n // use selected['selected']['1d'].indices to get selected elements\n var arrpos = $.inArray(cur_loc, bokeh_locs_list);\n var datapos = $.inArray(cur_loc, data_locs);\n var loc = cb_obj['data']['location'];\n $('#locs_list').empty();\n var selected_idxs = selected_loc['selected']['1d'].indices;\n for (var i = 0; i < selected_idxs.length; i++) {\n var cur_loc = bokeh_locs_list[selected_idxs[i]];\n $('#locs_list').append('<li class=\"list-group-item\" style=\"color:#000;\" id=\"' + cur_loc + '\">' + cur_loc + '</li>');\n locations.push(cur_loc);\n }\n source.trigger('change');\n });\n })();\n\n console.log(cb_obj);\n console.log(cb_obj['data']['skill']);\n\n // models passed as args are automagically available\n // xr.start = a;\n // xr.end = b;\n // listen for click in div, and clear skills list accordingly\n if (click_set == false) {\n $('#locs_plot').click(fn);\n click_set = true;\n }\n\n "},"id":"a31cda20-21f0-4755-ade7-c001efba18be","type":"CustomJS"},{"attributes":{"fill_alpha":{"value":0.1},"fill_color":{"value":"#1f77b4"},"line_alpha":{"value":0.1},"line_color":{"value":"#1f77b4"},"top":{"field":"pct jobs at location"},"width":{"value":0.9},"x":{"field":"index"}},"id":"b951bc11-c279-4088-91f0-a954e9a1c036","type":"VBar"},{"attributes":{"axis_label_text_font_size":{"value":"15pt"},"formatter":{"id":"a27eab66-b488-4d70-8e93-596c4f9c2330","type":"FixedTickFormatter"},"major_label_orientation":89.0,"plot":{"id":"006dff7e-17fe-4f75-8794-91e8803127e9","subtype":"Figure","type":"Plot"},"ticker":{"id":"4f8d5d5e-82d7-4362-a861-21ea7b73bb57","type":"BasicTicker"}},"id":"520c5573-87cc-4ee4-a9a6-9d9cf160dbe3","type":"LinearAxis"},{"attributes":{"callback":null,"end":29.5,"start":-0.5},"id":"1617ef0d-d6ab-4412-9297-72236c945876","type":"Range1d"},{"attributes":{"dimension":1,"grid_line_color":{"value":null},"plot":{"id":"918f512d-ebed-48e0-a321-384bd41b7335","subtype":"Figure","type":"Plot"},"ticker":{"id":"8d6337c2-7daf-4add-9c9a-506b86c3c7d9","type":"BasicTicker"}},"id":"9aecfad5-de08-49d5-8c25-9e333ff3102d","type":"Grid"},{"attributes":{"axis_label_text_font_size":{"value":"15pt"},"formatter":{"id":"9cf63af7-05cc-40b3-945c-b4a6adf1cfcf","type":"FixedTickFormatter"},"major_label_orientation":89.0,"plot":{"id":"918f512d-ebed-48e0-a321-384bd41b7335","subtype":"Figure","type":"Plot"},"ticker":{"id":"781dbcc7-0dc1-4558-8d8f-16a49406c738","type":"BasicTicker"}},"id":"6b88e4ab-4536-4299-8c76-1dc486e83ff7","type":"LinearAxis"},{"attributes":{"callback":null,"column_names":["color","index","pct jobs at location","location"],"data":{"color":["#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de"],"index":[0,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],"location":["New York, NY","San Francisco, CA","Boston, MA","","Seattle, WA","Chicago, IL","San Mateo, CA","Redwood City, CA","San Jose, CA","Minnetonka, MN","Chesterfield, MO","Washington, DC","Portland, OR","Dearborn, MI","Santa Clara, CA","Los Angeles, CA","Pittsburgh, PA","Palo Alto","Cambridge, MA","Irving, TX","Austin, TX","Berkeley, CA","Westminster, CO","New York City, NY","Sunnyvale, CA","Bridgewater, NJ","Cupertino, CA","Palo Alto, CA","Bellevue, WA","Creve Coeur, MO"],"pct jobs at location":[12.0,6.0,6.0,3.0,3.0,3.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0]}},"id":"28fcb0db-b8e0-4714-9dcf-87440be2561c","type":"ColumnDataSource"},{"attributes":{},"id":"74e040d4-ee1f-4784-8f77-474286c4e1d2","type":"BasicTicker"},{"attributes":{"axis_label":"percent of jobs at location","axis_label_text_font_size":{"value":"15pt"},"formatter":{"id":"f63f9c57-5a90-4ae4-bc07-429549f80db2","type":"BasicTickFormatter"},"plot":{"id":"006dff7e-17fe-4f75-8794-91e8803127e9","subtype":"Figure","type":"Plot"},"ticker":{"id":"e91bb406-4bd7-4bd4-942b-bd2b0e5e2e45","type":"BasicTicker"}},"id":"32e7f419-f93f-4d2a-b90d-42f9b772b661","type":"LinearAxis"},{"attributes":{"axis_label_text_font_size":{"value":"15pt"},"formatter":{"id":"bd226b92-3658-4dc8-8c0b-e1d9a5ee1308","type":"FixedTickFormatter"},"major_label_orientation":89.0,"plot":{"id":"0670c37d-7132-40d1-9671-9e00ee3aa3d4","subtype":"Figure","type":"Plot"},"ticker":{"id":"e8b0ffd0-df20-4a68-8583-4972e8f56c6c","type":"BasicTicker"}},"id":"567e6dfd-52fb-438d-ba32-9aeab88f7aba","type":"LinearAxis"},{"attributes":{"grid_line_color":{"value":null},"plot":{"id":"918f512d-ebed-48e0-a321-384bd41b7335","subtype":"Figure","type":"Plot"},"ticker":{"id":"781dbcc7-0dc1-4558-8d8f-16a49406c738","type":"BasicTicker"}},"id":"904862f3-ca85-43d9-9614-c705c33ce003","type":"Grid"},{"attributes":{"data_source":{"id":"dbcd4d61-d719-4e68-b3c7-8397028abbdb","type":"ColumnDataSource"},"glyph":{"id":"5c81e6a7-06ab-4ad2-8b03-9590984552d0","type":"VBar"},"hover_glyph":null,"nonselection_glyph":{"id":"8a539b22-c731-434a-a7f8-61b19605af98","type":"VBar"},"selection_glyph":null},"id":"a61a1a1b-6bd2-4ecb-a51e-0b0650d90eb2","type":"GlyphRenderer"},{"attributes":{"labels":{"0":"New York, NY","1":"San Francisco, CA","10":"Chesterfield, MO","11":"Washington, DC","12":"Portland, OR","13":"Dearborn, MI","14":"Santa Clara, CA","15":"Los Angeles, CA","16":"Pittsburgh, PA","17":"Palo Alto","18":"Cambridge, MA","19":"Irving, TX","2":"Boston, MA","20":"Austin, TX","21":"Berkeley, CA","22":"Westminster, CO","23":"New York City, NY","24":"Sunnyvale, CA","25":"Bridgewater, NJ","26":"Cupertino, CA","27":"Palo Alto, CA","28":"Bellevue, WA","29":"Creve Coeur, MO","3":"","4":"Seattle, WA","5":"Chicago, IL","6":"San Mateo, CA","7":"Redwood City, CA","8":"San Jose, CA","9":"Minnetonka, MN"}},"id":"bd226b92-3658-4dc8-8c0b-e1d9a5ee1308","type":"FixedTickFormatter"},{"attributes":{"callback":null,"end":20.0},"id":"6d517640-1c49-4f7b-ba35-de126a816749","type":"Range1d"},{"attributes":{},"id":"f63f9c57-5a90-4ae4-bc07-429549f80db2","type":"BasicTickFormatter"},{"attributes":{"grid_line_color":{"value":null},"plot":{"id":"006dff7e-17fe-4f75-8794-91e8803127e9","subtype":"Figure","type":"Plot"},"ticker":{"id":"4f8d5d5e-82d7-4362-a861-21ea7b73bb57","type":"BasicTicker"}},"id":"3cad46ca-9f6a-4896-bc9e-98aacfa68fac","type":"Grid"},{"attributes":{"callback":null,"end":29.5,"start":-0.5},"id":"ed0d4996-a963-4fb4-ad7e-767c56fbe11e","type":"Range1d"},{"attributes":{},"id":"52648c6f-b4aa-4c5f-b39c-8fae35864e0f","type":"BasicTicker"},{"attributes":{"args":{"source":{"id":"28fcb0db-b8e0-4714-9dcf-87440be2561c","type":"ColumnDataSource"},"xr":{"id":"1617ef0d-d6ab-4412-9297-72236c945876","type":"Range1d"}},"code":"\n // JavaScript code goes here\n\n // load jquery if not already loaded\n // Anonymous \"self-invoking\" function\n (function() {\n test2 = cb_obj;\n var bokeh_data = source['data'];\n var data_locs = bokeh_data['location'];\n bokeh_locs_list = data_locs;\n // Load the script\n var script = document.createElement(\"SCRIPT\");\n script.src = 'https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js';\n script.type = 'text/javascript';\n document.getElementsByTagName(\"head\")[0].appendChild(script);\n\n // Poll for jQuery to come into existance\n var checkReady = function(callback) {\n if (window.jQuery) {\n callback(jQuery);\n }\n else {\n window.setTimeout(function() { checkReady(callback); }, 100);\n }\n };\n\n // Start polling...\n checkReady(function($) {\n // Use $ here...\n var cur_loc = cb_obj['data']['locations'];\n selected_loc = cb_obj; // need to declare selected as var earlier,\n // use selected['selected']['1d'].indices to get selected elements\n var arrpos = $.inArray(cur_loc, bokeh_locs_list);\n var datapos = $.inArray(cur_loc, data_locs);\n var loc = cb_obj['data']['location'];\n $('#locs_list').empty();\n var selected_idxs = selected_loc['selected']['1d'].indices;\n for (var i = 0; i < selected_idxs.length; i++) {\n var cur_loc = bokeh_locs_list[selected_idxs[i]];\n $('#locs_list').append('<li class=\"list-group-item\" style=\"color:#000;\" id=\"' + cur_loc + '\">' + cur_loc + '</li>');\n locations.push(cur_loc);\n }\n source.trigger('change');\n });\n })();\n\n console.log(cb_obj);\n console.log(cb_obj['data']['skill']);\n\n // models passed as args are automagically available\n // xr.start = a;\n // xr.end = b;\n // listen for click in div, and clear skills list accordingly\n if (click_set == false) {\n $('#locs_plot').click(fn);\n click_set = true;\n }\n\n "},"id":"608dd5bc-0bfa-47ca-af7b-5346c32c8822","type":"CustomJS"},{"attributes":{"axis_label":"percent of jobs in state","axis_label_text_font_size":{"value":"15pt"},"formatter":{"id":"cd580967-4b47-4154-ae66-cf8cf2d8fa5b","type":"BasicTickFormatter"},"plot":{"id":"fc32cf8a-63f2-48a3-89e7-2e4ae341f0aa","subtype":"Figure","type":"Plot"},"ticker":{"id":"74e040d4-ee1f-4784-8f77-474286c4e1d2","type":"BasicTicker"}},"id":"c9d79d8d-7e8e-41b8-bba3-86183e3eae34","type":"LinearAxis"},{"attributes":{"fill_alpha":{"value":0.1},"fill_color":{"value":"#1f77b4"},"line_alpha":{"value":0.1},"line_color":{"value":"#1f77b4"},"top":{"field":"pct jobs in state"},"width":{"value":0.9},"x":{"field":"index"}},"id":"662ced07-8c0a-4f49-81e2-a13dccfe1705","type":"VBar"},{"attributes":{"below":[{"id":"8d7f4d08-429b-4ef5-b39d-0638cff9014a","type":"LinearAxis"}],"left":[{"id":"c9d79d8d-7e8e-41b8-bba3-86183e3eae34","type":"LinearAxis"}],"plot_height":500,"plot_width":500,"renderers":[{"id":"8d7f4d08-429b-4ef5-b39d-0638cff9014a","type":"LinearAxis"},{"id":"809f6623-376b-4fef-a9a4-b460d918d6ff","type":"Grid"},{"id":"c9d79d8d-7e8e-41b8-bba3-86183e3eae34","type":"LinearAxis"},{"id":"36a79a75-010a-4812-99b9-2f2260b10144","type":"Grid"},{"id":"138aaaba-58ff-4f2f-937c-bc7852ff1c57","type":"GlyphRenderer"}],"title":{"id":"4ca6a122-db84-4338-8e99-19cb0427ba4b","type":"Title"},"tool_events":{"id":"520456eb-0387-476f-8330-68f2498cb88e","type":"ToolEvents"},"toolbar":{"id":"0546cd3e-18d9-497b-bf9a-b389a6042f9e","type":"Toolbar"},"x_range":{"id":"ed0d4996-a963-4fb4-ad7e-767c56fbe11e","type":"Range1d"},"y_range":{"id":"d692b8aa-6a17-46a3-b8fc-3dfe2043ebd8","type":"Range1d"}},"id":"fc32cf8a-63f2-48a3-89e7-2e4ae341f0aa","subtype":"Figure","type":"Plot"},{"attributes":{"below":[{"id":"6b88e4ab-4536-4299-8c76-1dc486e83ff7","type":"LinearAxis"}],"left":[{"id":"db0bb318-0a6c-4335-8bcc-471d8022b56c","type":"LinearAxis"}],"plot_height":500,"plot_width":500,"renderers":[{"id":"6b88e4ab-4536-4299-8c76-1dc486e83ff7","type":"LinearAxis"},{"id":"904862f3-ca85-43d9-9614-c705c33ce003","type":"Grid"},{"id":"db0bb318-0a6c-4335-8bcc-471d8022b56c","type":"LinearAxis"},{"id":"9aecfad5-de08-49d5-8c25-9e333ff3102d","type":"Grid"},{"id":"a61a1a1b-6bd2-4ecb-a51e-0b0650d90eb2","type":"GlyphRenderer"}],"title":{"id":"2ad60d2d-c9bd-4ade-980d-4ade1328e3c2","type":"Title"},"tool_events":{"id":"4925b04e-bd1f-4a7d-b009-e6db837b012e","type":"ToolEvents"},"toolbar":{"id":"fe577468-6b5c-4ad7-ad8b-6452cf47d9db","type":"Toolbar"},"x_range":{"id":"6a5c56e3-fc4f-43ff-ba63-c72ff8e56fe7","type":"Range1d"},"y_range":{"id":"be27773d-ba01-4fa0-9a96-24fc82ac139a","type":"Range1d"}},"id":"918f512d-ebed-48e0-a321-384bd41b7335","subtype":"Figure","type":"Plot"},{"attributes":{"data_source":{"id":"3b8db75d-7ed0-434a-a365-ce672cbaf385","type":"ColumnDataSource"},"glyph":{"id":"4654bb5d-4be9-499e-877d-8326bf6465ce","type":"VBar"},"hover_glyph":null,"nonselection_glyph":{"id":"4d6a1d2f-4f14-44f3-8ded-9e11dec73a22","type":"VBar"},"selection_glyph":null},"id":"4b3a9db8-8767-4bd8-b75c-a80a14961014","type":"GlyphRenderer"},{"attributes":{"desired_num_ticks":30,"num_minor_ticks":0},"id":"781dbcc7-0dc1-4558-8d8f-16a49406c738","type":"BasicTicker"},{"attributes":{"callback":null,"plot":{"id":"fc32cf8a-63f2-48a3-89e7-2e4ae341f0aa","subtype":"Figure","type":"Plot"}},"id":"4e8c2287-718f-4704-850b-22ee5c27a241","type":"TapTool"},{"attributes":{"dimension":1,"grid_line_color":{"value":null},"plot":{"id":"0670c37d-7132-40d1-9671-9e00ee3aa3d4","subtype":"Figure","type":"Plot"},"ticker":{"id":"52648c6f-b4aa-4c5f-b39c-8fae35864e0f","type":"BasicTicker"}},"id":"810995c2-6ca7-4886-a33c-4a76066a4c63","type":"Grid"},{"attributes":{},"id":"b72744cf-a461-4f1c-b1a6-eb3b504a351f","type":"ToolEvents"},{"attributes":{"callback":null,"column_names":["color","index","pct jobs in state","location"],"data":{"color":["#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de","#6999de"],"index":[0,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],"location":["CA","NY","MA","VA","TX","IL","NJ","WA","MO","MN","PA","MD","MI","OR","DC","NC","FL","CO","GA","LA","OH","NE","NM","TN","WI","IN","AZ","KY","UT","DE"],"pct jobs in state":[27.677329624478443,13.977746870653684,8.762169680111267,4.937413073713491,4.728789986091794,4.520166898470097,3.9638386648122395,3.68567454798331,3.616133518776078,3.129346314325452,2.920723226703755,2.5034770514603615,2.364394993045897,2.2253129346314324,2.086230876216968,1.7385257301808066,1.321279554937413,1.2517385257301807,1.1126564673157162,0.48678720445062584,0.48678720445062584,0.4172461752433936,0.4172461752433936,0.4172461752433936,0.4172461752433936,0.27816411682892905,0.2086230876216968,0.2086230876216968,0.06954102920723226,0.06954102920723226]}},"id":"a3a24e92-79d3-421d-aaeb-19eba5b76c98","type":"ColumnDataSource"},{"attributes":{"axis_label":"percent of jobs at location","axis_label_text_font_size":{"value":"15pt"},"formatter":{"id":"0ff82d50-f6aa-4192-8a22-c1cb96366514","type":"BasicTickFormatter"},"plot":{"id":"0670c37d-7132-40d1-9671-9e00ee3aa3d4","subtype":"Figure","type":"Plot"},"ticker":{"id":"52648c6f-b4aa-4c5f-b39c-8fae35864e0f","type":"BasicTicker"}},"id":"bc4dedc6-7726-4d7c-9b73-e377b647810d","type":"LinearAxis"},{"attributes":{"active_drag":"auto","active_scroll":"auto","active_tap":"auto","tools":[{"id":"19517bb5-8bb6-46e4-b510-666978532bae","type":"TapTool"}]},"id":"28700302-312a-4ee2-b3c8-96c13e47fcf7","type":"Toolbar"},{"attributes":{"plot":null,"text":"Top locations for data science","text_font_size":{"value":"15pt"}},"id":"91931879-2f9f-4052-b503-26fe9de2b06b","type":"Title"},{"attributes":{},"id":"520456eb-0387-476f-8330-68f2498cb88e","type":"ToolEvents"},{"attributes":{"callback":{"id":"a31cda20-21f0-4755-ade7-c001efba18be","type":"CustomJS"},"plot":{"id":"0670c37d-7132-40d1-9671-9e00ee3aa3d4","subtype":"Figure","type":"Plot"}},"id":"1dbe4301-1685-4761-bdee-25821ca4516a","type":"TapTool"},{"attributes":{"active_drag":"auto","active_scroll":"auto","active_tap":"auto","tools":[{"id":"4e8c2287-718f-4704-850b-22ee5c27a241","type":"TapTool"}]},"id":"0546cd3e-18d9-497b-bf9a-b389a6042f9e","type":"Toolbar"},{"attributes":{"plot":null,"text":"Top states for data science","text_font_size":{"value":"15pt"}},"id":"4ca6a122-db84-4338-8e99-19cb0427ba4b","type":"Title"},{"attributes":{"labels":{"0":"New York, NY","1":"San Francisco, CA","10":"Chesterfield, MO","11":"Washington, DC","12":"Portland, OR","13":"Dearborn, MI","14":"Santa Clara, CA","15":"Los Angeles, CA","16":"Pittsburgh, PA","17":"Palo Alto","18":"Cambridge, MA","19":"Irving, TX","2":"Boston, MA","20":"Austin, TX","21":"Berkeley, CA","22":"Westminster, CO","23":"New York City, NY","24":"Sunnyvale, CA","25":"Bridgewater, NJ","26":"Cupertino, CA","27":"Palo Alto, CA","28":"Bellevue, WA","29":"Creve Coeur, MO","3":"","4":"Seattle, WA","5":"Chicago, IL","6":"San Mateo, CA","7":"Redwood City, CA","8":"San Jose, CA","9":"Minnetonka, MN"}},"id":"a27eab66-b488-4d70-8e93-596c4f9c2330","type":"FixedTickFormatter"},{"attributes":{"desired_num_ticks":30,"num_minor_ticks":0},"id":"e8b0ffd0-df20-4a68-8583-4972e8f56c6c","type":"BasicTicker"},{"attributes":{"callback":null,"end":20.0},"id":"be27773d-ba01-4fa0-9a96-24fc82ac139a","type":"Range1d"},{"attributes":{"active_drag":"auto","active_scroll":"auto","active_tap":"auto","tools":[{"id":"1dbe4301-1685-4761-bdee-25821ca4516a","type":"TapTool"}]},"id":"375c9ac7-993b-4145-95a8-2b4c4a7e9980","type":"Toolbar"},{"attributes":{"plot":null,"text":"Top locations for data science","text_font_size":{"value":"15pt"}},"id":"9b9f128a-dbf7-4e3e-ae12-44ee3b2ed8ab","type":"Title"},{"attributes":{"below":[{"id":"520c5573-87cc-4ee4-a9a6-9d9cf160dbe3","type":"LinearAxis"}],"left":[{"id":"32e7f419-f93f-4d2a-b90d-42f9b772b661","type":"LinearAxis"}],"plot_height":500,"plot_width":500,"renderers":[{"id":"520c5573-87cc-4ee4-a9a6-9d9cf160dbe3","type":"LinearAxis"},{"id":"3cad46ca-9f6a-4896-bc9e-98aacfa68fac","type":"Grid"},{"id":"32e7f419-f93f-4d2a-b90d-42f9b772b661","type":"LinearAxis"},{"id":"74537d44-4972-4180-86aa-af5e6c5007b4","type":"Grid"},{"id":"8167a53a-6a57-4ce6-8bf7-ba2965b9d730","type":"GlyphRenderer"}],"title":{"id":"91931879-2f9f-4052-b503-26fe9de2b06b","type":"Title"},"tool_events":{"id":"d54f9c90-ad78-4ecd-af6a-6d9c04e7f5be","type":"ToolEvents"},"toolbar":{"id":"28700302-312a-4ee2-b3c8-96c13e47fcf7","type":"Toolbar"},"x_range":{"id":"1617ef0d-d6ab-4412-9297-72236c945876","type":"Range1d"},"y_range":{"id":"3e9c2485-f8af-45a0-89f8-8ed789876113","type":"Range1d"}},"id":"006dff7e-17fe-4f75-8794-91e8803127e9","subtype":"Figure","type":"Plot"}],"root_ids":["006dff7e-17fe-4f75-8794-91e8803127e9","918f512d-ebed-48e0-a321-384bd41b7335","0670c37d-7132-40d1-9671-9e00ee3aa3d4","fc32cf8a-63f2-48a3-89e7-2e4ae341f0aa"]},"title":"Bokeh Application","version":"0.12.3"}};
var render_items = [{"docid":"18ceff98-e204-4337-af1c-45878b42744f","elementid":"32410101-5925-4ff3-a50d-0b4d2b7cf24f","modelid":"fc32cf8a-63f2-48a3-89e7-2e4ae341f0aa"}];
Bokeh.embed.embed_items(docs_json, render_items);
});
});
</script>
</body>
</html>