figure(ylab = "ride distance log10(miles + 1)", height = 450) %>%
ly_points(fval, q, data = rd_quant,
hover = rd_quant)
Last active
October 7, 2015 05:22
-
-
Save hafen/92531d41cfb55739f1dd to your computer and use it in GitHub Desktop.
NYC Taxi Manhattan Ride Distance Distribution
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://cdn.pydata.org/bokeh/release/bokeh-0.10.0.min.js"></script> | |
<link href="http://cdn.pydata.org/bokeh/release/bokeh-0.10.0.min.css" rel="stylesheet"> | |
</head> | |
<body> | |
<div id="3243cc070def283f107d9726efc3275f" class="plotdiv"></div> | |
<script type="text/javascript"> | |
Bokeh.$(function() { | |
var modelid = "d421b20c822c91117407a43d77303014"; | |
var modeltype = "Plot"; | |
var elementid = "3243cc070def283f107d9726efc3275f"; | |
Bokeh.logger.info("Realizing plot:"); | |
Bokeh.logger.info(" - modeltype: Plot"); | |
Bokeh.logger.info(" - modelid: d421b20c822c91117407a43d77303014"); | |
Bokeh.logger.info(" - elementid: 3243cc070def283f107d9726efc3275f"); | |
var all_models = [{"type":"Plot","id":"d421b20c822c91117407a43d77303014","attributes":{"title":null,"id":"d421b20c822c91117407a43d77303014","plot_width":470,"plot_height":404,"x_range":{"type":"Range1d","id":"8973644a7601430289df4ea146b5c018"},"y_range":{"type":"Range1d","id":"7747ae052f79d8ffa64b509bb39f2b5c"},"left":[{"type":"LinearAxis","id":"c318a29e5a8e422815e40a2a04919360"}],"below":[{"type":"LinearAxis","id":"47bef4c4cf8363da1cf1d18e44fc43e7"}],"right":[],"above":[],"renderers":[{"type":"GlyphRenderer","id":"91aef09864c4f5ba27e39cb3d546449a"},{"type":"LinearAxis","id":"47bef4c4cf8363da1cf1d18e44fc43e7"},{"type":"Grid","id":"29c824a1c8b25fc5dbb429af16695314"},{"type":"LinearAxis","id":"c318a29e5a8e422815e40a2a04919360"},{"type":"Grid","id":"27001af371dc3106224cee1ddd708a70"}],"tools":[{"type":"PanTool","id":"7e4625ae2075b24bb185b6a62e2ec4da"},{"type":"WheelZoomTool","id":"08cddd64389b18800bdf4f061b512b37"},{"type":"BoxZoomTool","id":"f6f4737855f87aa3d9a6574d126a6b80"},{"type":"ResizeTool","id":"c312c3219291b7659385e81c25a62788"},{"type":"ResetTool","id":"e320cbe7556240aae5b960eb129912ba"},{"type":"PreviewSaveTool","id":"cf80c987e9ae2137b293b4765c222644"},{"type":"HelpTool","id":"e8eecfaef7cd05d77afd85d2ba02e4ad"},{"type":"HoverTool","id":"6791158f1addc1e53752029b14cb3d6b"}],"tool_events":{"type":"ToolEvents","id":"37d5e6dd6b171f881a00f70ea87b51b8"},"extra_y_ranges":{},"extra_x_ranges":{},"tags":[],"doc":null,"min_border":4,"lod_threshold":null},"subtype":"Figure"},{"type":"PanTool","id":"7e4625ae2075b24bb185b6a62e2ec4da","attributes":{"id":"7e4625ae2075b24bb185b6a62e2ec4da","tags":[],"doc":null,"plot":{"type":"Plot","id":"d421b20c822c91117407a43d77303014","subtype":"Figure"},"dimensions":["width","height"]}},{"type":"ToolEvents","id":"37d5e6dd6b171f881a00f70ea87b51b8","attributes":{"id":"37d5e6dd6b171f881a00f70ea87b51b8","tags":[],"doc":null},"geometries":[]},{"type":"WheelZoomTool","id":"08cddd64389b18800bdf4f061b512b37","attributes":{"id":"08cddd64389b18800bdf4f061b512b37","tags":[],"doc":null,"plot":{"type":"Plot","id":"d421b20c822c91117407a43d77303014","subtype":"Figure"},"dimensions":["width","height"]}},{"type":"BoxZoomTool","id":"f6f4737855f87aa3d9a6574d126a6b80","attributes":{"id":"f6f4737855f87aa3d9a6574d126a6b80","tags":[],"doc":null,"plot":{"type":"Plot","id":"d421b20c822c91117407a43d77303014","subtype":"Figure"}}},{"type":"ResizeTool","id":"c312c3219291b7659385e81c25a62788","attributes":{"id":"c312c3219291b7659385e81c25a62788","tags":[],"doc":null,"plot":{"type":"Plot","id":"d421b20c822c91117407a43d77303014","subtype":"Figure"}}},{"type":"ResetTool","id":"e320cbe7556240aae5b960eb129912ba","attributes":{"id":"e320cbe7556240aae5b960eb129912ba","tags":[],"doc":null,"plot":{"type":"Plot","id":"d421b20c822c91117407a43d77303014","subtype":"Figure"}}},{"type":"PreviewSaveTool","id":"cf80c987e9ae2137b293b4765c222644","attributes":{"id":"cf80c987e9ae2137b293b4765c222644","tags":[],"doc":null,"plot":{"type":"Plot","id":"d421b20c822c91117407a43d77303014","subtype":"Figure"}}},{"type":"HelpTool","id":"e8eecfaef7cd05d77afd85d2ba02e4ad","attributes":{"id":"e8eecfaef7cd05d77afd85d2ba02e4ad","tags":[],"doc":null,"plot":{"type":"Plot","id":"d421b20c822c91117407a43d77303014","subtype":"Figure"},"redirect":["http://hafen.github.io/rbokeh"],"help_tooltip":["Click to learn more about rbokeh."]}},{"type":"HoverTool","id":"6791158f1addc1e53752029b14cb3d6b","attributes":{"id":"6791158f1addc1e53752029b14cb3d6b","tags":[],"doc":null,"plot":{"type":"Plot","id":"d421b20c822c91117407a43d77303014","subtype":"Figure"},"renderers":[{"type":"GlyphRenderer","id":"91aef09864c4f5ba27e39cb3d546449a"}],"names":[],"always_active":true,"tooltips":[["fval","@hover_fval"],["q","@hover_q"]]}},{"type":"ColumnDataSource","id":"2f378eeb61b67aebebe73374c6e63276","attributes":{"id":"2f378eeb61b67aebebe73374c6e63276","tags":[],"doc":null,"column_names":["x","y","hover_fval","hover_q"],"selected":[],"discrete_ranges":{},"cont_ranges":{},"data":{"x":[0,0.005,0.01,0.015,0.02,0.025,0.03,0.035,0.04,0.045,0.05,0.055,0.06,0.065,0.07,0.075,0.08,0.085,0.09,0.095,0.1,0.105,0.11,0.115,0.12,0.125,0.13,0.135,0.14,0.145,0.15,0.155,0.16,0.165,0.17,0.175,0.18,0.185,0.19,0.195,0.2,0.205,0.21,0.215,0.22,0.225,0.23,0.235,0.24,0.245,0.25,0.255,0.26,0.265,0.27,0.275,0.28,0.285,0.29,0.295,0.3,0.305,0.31,0.315,0.32,0.325,0.33,0.335,0.34,0.345,0.35,0.355,0.36,0.365,0.37,0.375,0.38,0.385,0.39,0.395,0.4,0.405,0.41,0.415,0.42,0.425,0.43,0.435,0.44,0.445,0.45,0.455,0.46,0.465,0.47,0.475,0.48,0.485,0.49,0.495,0.5,0.505,0.51,0.515,0.52,0.525,0.53,0.535,0.54,0.545,0.55,0.555,0.56,0.565,0.57,0.575,0.58,0.585,0.59,0.595,0.6,0.605,0.61,0.615,0.62,0.625,0.63,0.635,0.64,0.645,0.65,0.655,0.66,0.665,0.67,0.675,0.68,0.685,0.69,0.695,0.7,0.705,0.71,0.715,0.72,0.725,0.73,0.735,0.74,0.745,0.75,0.755,0.76,0.765,0.77,0.775,0.78,0.785,0.79,0.795,0.8,0.805,0.81,0.815,0.82,0.825,0.83,0.835,0.84,0.845,0.85,0.855,0.86,0.865,0.87,0.875,0.88,0.885,0.89,0.895,0.9,0.905,0.91,0.915,0.92,0.925,0.93,0.935,0.94,0.945,0.95,0.955,0.96,0.965,0.97,0.975,0.98,0.985,0.99,0.995,1],"y":[0,0.0335,0.0794,0.1139,0.1171,0.1463,0.1463,0.149,0.1674,0.176,0.176,0.176,0.1819,0.1933,0.2014,0.2041,0.2041,0.2041,0.2068,0.2149,0.223,0.2278,0.2305,0.2305,0.2305,0.2305,0.2354,0.2429,0.2478,0.2526,0.2553,0.2553,0.2553,0.2553,0.2575,0.2624,0.2694,0.2742,0.2786,0.2786,0.2786,0.2786,0.2786,0.2834,0.2877,0.2921,0.2969,0.3012,0.3012,0.3012,0.3012,0.3012,0.3034,0.3077,0.3115,0.3158,0.3223,0.3223,0.3223,0.3223,0.3223,0.3244,0.3304,0.3347,0.3385,0.3423,0.3423,0.3423,0.3423,0.3423,0.3482,0.352,0.3579,0.3617,0.3617,0.3617,0.3617,0.3617,0.3671,0.3709,0.3768,0.3801,0.3801,0.3801,0.3801,0.3822,0.3876,0.3925,0.3979,0.3979,0.3979,0.3979,0.3995,0.4049,0.4097,0.4135,0.4151,0.4151,0.4151,0.4168,0.4216,0.4265,0.4313,0.4313,0.4313,0.4313,0.4362,0.4411,0.447,0.447,0.447,0.447,0.4519,0.4578,0.4626,0.4626,0.4626,0.4637,0.4697,0.4756,0.4772,0.4772,0.4772,0.4799,0.4859,0.4913,0.4913,0.4913,0.4956,0.501,0.5053,0.5053,0.5064,0.5118,0.5183,0.5183,0.5183,0.5253,0.5312,0.5312,0.5312,0.5393,0.5442,0.5442,0.5479,0.5539,0.556,0.5577,0.5647,0.5685,0.5685,0.5749,0.5798,0.5798,0.5879,0.5911,0.5933,0.6019,0.6019,0.6073,0.6127,0.6149,0.623,0.623,0.6332,0.6332,0.6435,0.6457,0.6532,0.657,0.6629,0.671,0.6748,0.6813,0.6905,0.6975,0.7018,0.7077,0.7158,0.7245,0.7326,0.7412,0.7515,0.7617,0.7709,0.779,0.7925,0.8011,0.813,0.826,0.8389,0.8524,0.8692,0.8859,0.9032,0.9237,0.9447,0.969,0.9998,1.0414,5.3979],"hover_fval":["0.000","0.005","0.010","0.015","0.020","0.025","0.030","0.035","0.040","0.045","0.050","0.055","0.060","0.065","0.070","0.075","0.080","0.085","0.090","0.095","0.100","0.105","0.110","0.115","0.120","0.125","0.130","0.135","0.140","0.145","0.150","0.155","0.160","0.165","0.170","0.175","0.180","0.185","0.190","0.195","0.200","0.205","0.210","0.215","0.220","0.225","0.230","0.235","0.240","0.245","0.250","0.255","0.260","0.265","0.270","0.275","0.280","0.285","0.290","0.295","0.300","0.305","0.310","0.315","0.320","0.325","0.330","0.335","0.340","0.345","0.350","0.355","0.360","0.365","0.370","0.375","0.380","0.385","0.390","0.395","0.400","0.405","0.410","0.415","0.420","0.425","0.430","0.435","0.440","0.445","0.450","0.455","0.460","0.465","0.470","0.475","0.480","0.485","0.490","0.495","0.500","0.505","0.510","0.515","0.520","0.525","0.530","0.535","0.540","0.545","0.550","0.555","0.560","0.565","0.570","0.575","0.580","0.585","0.590","0.595","0.600","0.605","0.610","0.615","0.620","0.625","0.630","0.635","0.640","0.645","0.650","0.655","0.660","0.665","0.670","0.675","0.680","0.685","0.690","0.695","0.700","0.705","0.710","0.715","0.720","0.725","0.730","0.735","0.740","0.745","0.750","0.755","0.760","0.765","0.770","0.775","0.780","0.785","0.790","0.795","0.800","0.805","0.810","0.815","0.820","0.825","0.830","0.835","0.840","0.845","0.850","0.855","0.860","0.865","0.870","0.875","0.880","0.885","0.890","0.895","0.900","0.905","0.910","0.915","0.920","0.925","0.930","0.935","0.940","0.945","0.950","0.955","0.960","0.965","0.970","0.975","0.980","0.985","0.990","0.995","1.000"],"hover_q":["0.00000000","0.03347059","0.07935768","0.11390796","0.11714705","0.14629885","0.14629885","0.14899809","0.16735293","0.17599050","0.17599050","0.17599050","0.18192883","0.19326564","0.20136336","0.20406260","0.20406260","0.20406260","0.20676185","0.21485957","0.22295729","0.22781592","0.23051516","0.23051516","0.23051516","0.23051516","0.23537380","0.24293167","0.24779031","0.25264894","0.25534818","0.25534818","0.25534818","0.25534818","0.25750757","0.26236621","0.26938423","0.27424286","0.27856165","0.27856165","0.27856165","0.27856165","0.27856165","0.28342028","0.28773907","0.29205785","0.29691649","0.30123527","0.30123527","0.30123527","0.30123527","0.30123527","0.30339467","0.30771345","0.31149239","0.31581117","0.32228935","0.32228935","0.32228935","0.32228935","0.32228935","0.32444874","0.33038707","0.33470586","0.33848480","0.34226373","0.34226373","0.34226373","0.34226373","0.34226373","0.34820206","0.35198100","0.35791933","0.36169827","0.36169827","0.36169827","0.36169827","0.36169827","0.36709675","0.37087569","0.37681402","0.38005310","0.38005310","0.38005310","0.38005310","0.38221250","0.38761098","0.39246961","0.39786809","0.39786809","0.39786809","0.39786809","0.39948764","0.40488612","0.40974475","0.41352369","0.41514323","0.41514323","0.41514323","0.41676278","0.42162141","0.42648005","0.43133868","0.43133868","0.43133868","0.43133868","0.43619731","0.44105595","0.44699428","0.44699428","0.44699428","0.44699428","0.45185291","0.45779124","0.46264987","0.46264987","0.46264987","0.46372957","0.46966790","0.47560623","0.47722577","0.47722577","0.47722577","0.47992501","0.48586334","0.49126183","0.49126183","0.49126183","0.49558061","0.50097909","0.50529788","0.50529788","0.50637757","0.51177606","0.51825423","0.51825423","0.51825423","0.52527226","0.53121059","0.53121059","0.53121059","0.53930831","0.54416694","0.54416694","0.54794588","0.55388421","0.55604360","0.55766315","0.56468117","0.56846011","0.56846011","0.57493829","0.57979692","0.57979692","0.58789465","0.59113373","0.59329313","0.60193070","0.60193070","0.60732918","0.61272766","0.61488705","0.62298478","0.62298478","0.63324189","0.63324189","0.64349901","0.64565840","0.65321627","0.65699521","0.66293354","0.67103126","0.67481020","0.68128838","0.69046580","0.69748382","0.70180261","0.70774094","0.71583866","0.72447623","0.73257395","0.74121152","0.75146864","0.76172575","0.77090317","0.77900089","0.79249710","0.80113467","0.81301133","0.82596768","0.83892404","0.85242024","0.86915554","0.88589083","0.90316597","0.92368020","0.94473428","0.96902745","0.99979879","1.04136710","5.39794175"]}}},{"type":"Circle","id":"54cfa1a1f44927aaafd3bc88d30ddb6e","attributes":{"id":"54cfa1a1f44927aaafd3bc88d30ddb6e","tags":[],"doc":null,"size":{"units":"screen","value":10},"line_color":{"units":"data","value":"#1F77B4"},"fill_color":{"units":"data","value":"#1F77B4"},"line_alpha":{"units":"data","value":1},"fill_alpha":{"units":"data","value":0.5},"x":{"units":"data","field":"x"},"y":{"units":"data","field":"y"}}},{"type":"Circle","id":"71b1ce47e3843fa1603232bdd4b14bd2","attributes":{"id":"71b1ce47e3843fa1603232bdd4b14bd2","tags":[],"doc":null,"size":{"units":"screen","value":10},"line_color":{"units":"data","value":"#e1e1e1"},"fill_color":{"units":"data","value":"#e1e1e1"},"line_alpha":{"units":"data","value":1},"fill_alpha":{"units":"data","value":0.5},"x":{"units":"data","field":"x"},"y":{"units":"data","field":"y"}}},{"type":"GlyphRenderer","id":"91aef09864c4f5ba27e39cb3d546449a","attributes":{"id":"91aef09864c4f5ba27e39cb3d546449a","tags":[],"doc":null,"selection_glyph":null,"nonselection_glyph":{"type":"Circle","id":"71b1ce47e3843fa1603232bdd4b14bd2"},"server_data_source":null,"name":null,"data_source":{"type":"ColumnDataSource","id":"2f378eeb61b67aebebe73374c6e63276"},"glyph":{"type":"Circle","id":"54cfa1a1f44927aaafd3bc88d30ddb6e"}}},{"type":"Range1d","id":"8973644a7601430289df4ea146b5c018","attributes":{"id":"8973644a7601430289df4ea146b5c018","tags":[],"doc":null,"start":-0.07,"end":1.07}},{"type":"Range1d","id":"7747ae052f79d8ffa64b509bb39f2b5c","attributes":{"id":"7747ae052f79d8ffa64b509bb39f2b5c","tags":[],"doc":null,"start":-0.3779,"end":5.7758}},{"type":"LinearAxis","id":"47bef4c4cf8363da1cf1d18e44fc43e7","attributes":{"id":"47bef4c4cf8363da1cf1d18e44fc43e7","tags":[],"doc":null,"plot":{"type":"Plot","id":"d421b20c822c91117407a43d77303014","subtype":"Figure"},"axis_label":"fval","formatter":{"type":"BasicTickFormatter","id":"b8be1ed02924f26f0fb6b60057b768e8"},"ticker":{"type":"BasicTicker","id":"e75e65869df5bb5f1815469c0456eb35"},"visible":true,"axis_label_text_font_size":"12pt"}},{"type":"BasicTickFormatter","id":"b8be1ed02924f26f0fb6b60057b768e8","attributes":{"id":"b8be1ed02924f26f0fb6b60057b768e8","tags":[],"doc":null}},{"type":"BasicTicker","id":"e75e65869df5bb5f1815469c0456eb35","attributes":{"id":"e75e65869df5bb5f1815469c0456eb35","tags":[],"doc":null,"num_minor_ticks":5}},{"type":"Grid","id":"29c824a1c8b25fc5dbb429af16695314","attributes":{"id":"29c824a1c8b25fc5dbb429af16695314","tags":[],"doc":null,"dimension":0,"plot":{"type":"Plot","id":"d421b20c822c91117407a43d77303014","subtype":"Figure"},"ticker":{"type":"BasicTicker","id":"e75e65869df5bb5f1815469c0456eb35"}}},{"type":"LinearAxis","id":"c318a29e5a8e422815e40a2a04919360","attributes":{"id":"c318a29e5a8e422815e40a2a04919360","tags":[],"doc":null,"plot":{"type":"Plot","id":"d421b20c822c91117407a43d77303014","subtype":"Figure"},"axis_label":"ride distance log10(miles + 1)","formatter":{"type":"BasicTickFormatter","id":"ef2ad46f1f284b4678bea2190180e8d9"},"ticker":{"type":"BasicTicker","id":"a033e4cc9375e34b10ca8f4080265071"},"visible":true,"axis_label_text_font_size":"12pt"}},{"type":"BasicTickFormatter","id":"ef2ad46f1f284b4678bea2190180e8d9","attributes":{"id":"ef2ad46f1f284b4678bea2190180e8d9","tags":[],"doc":null}},{"type":"BasicTicker","id":"a033e4cc9375e34b10ca8f4080265071","attributes":{"id":"a033e4cc9375e34b10ca8f4080265071","tags":[],"doc":null,"num_minor_ticks":5}},{"type":"Grid","id":"27001af371dc3106224cee1ddd708a70","attributes":{"id":"27001af371dc3106224cee1ddd708a70","tags":[],"doc":null,"dimension":1,"plot":{"type":"Plot","id":"d421b20c822c91117407a43d77303014","subtype":"Figure"},"ticker":{"type":"BasicTicker","id":"a033e4cc9375e34b10ca8f4080265071"}}}]; | |
Bokeh.load_models(all_models); | |
var model = Bokeh.Collections(modeltype).get(modelid); | |
var view = new model.default_view({model: model, el: '#3243cc070def283f107d9726efc3275f'}); | |
Bokeh.index[modelid] = view; | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment