j1-template 2022.5.0.rc1 → 2022.5.0.rc4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (378) hide show
  1. checksums.yaml +4 -4
  2. data/assets/data/banner.html +24 -1
  3. data/assets/themes/j1/adapter/js/masterslider.js +22 -5
  4. data/assets/themes/j1/core/css/themes/unolight/bootstrap.css +56 -0
  5. data/assets/themes/j1/core/css/themes/unolight/bootstrap.min.css +1 -1
  6. data/lib/j1/version.rb +1 -1
  7. data/lib/starter_web/Gemfile +270 -270
  8. data/lib/starter_web/_config.yml +19 -9
  9. data/lib/starter_web/_data/blocks/banner.yml +17 -0
  10. data/lib/starter_web/_data/modules/defaults/masterslider.yml +1 -1
  11. data/lib/starter_web/_data/modules/justifiedGallery.yml +82 -0
  12. data/lib/starter_web/_data/modules/masterslider.yml +5 -9
  13. data/lib/starter_web/_data/modules/navigator_menu.yml +208 -168
  14. data/lib/starter_web/_includes/attributes.asciidoc +18 -14
  15. data/lib/starter_web/_includes/tables/template_variables.asciidoc +1 -1
  16. data/lib/starter_web/_plugins/asciidoctor-extensions/lightbox-block.rb +4 -4
  17. data/lib/starter_web/assets/images/pages/features/blog-post-navigator-1280x1000.jpg +0 -0
  18. data/lib/starter_web/assets/images/pages/features/bootswatch-themes-1280x800.png +0 -0
  19. data/lib/starter_web/assets/images/pages/features/clipboard-1280x600.jpg +0 -0
  20. data/lib/starter_web/assets/images/pages/features/comments-1280x600.jpg +0 -0
  21. data/lib/starter_web/assets/images/pages/features/cookie-consent-1280x800.jpg +0 -0
  22. data/lib/starter_web/assets/images/pages/features/desktop-web-navigation-1280x1000.jpg +0 -0
  23. data/lib/starter_web/assets/images/pages/features/example-content-1280x800.jpg +0 -0
  24. data/lib/starter_web/assets/images/pages/features/example-content-present-videos-1280x800.jpg +0 -0
  25. data/lib/starter_web/assets/images/pages/features/fab-1280x500.jpg +0 -0
  26. data/lib/starter_web/assets/images/pages/features/full-text-search-1280x800.jpg +0 -0
  27. data/lib/starter_web/assets/images/pages/features/global-mobile-traffic-1920x1080.png +0 -0
  28. data/lib/starter_web/assets/images/pages/features/google-lighthouse-1080x300.png +0 -0
  29. data/lib/starter_web/assets/images/pages/features/intro-panel-1280x800.jpg +0 -0
  30. data/lib/starter_web/assets/images/pages/features/master-header-1280x600.jpg +0 -0
  31. data/lib/starter_web/assets/images/pages/features/mobile-navigation-600x800.png +0 -0
  32. data/lib/starter_web/assets/images/pages/features/native-speakers-by-language.png +0 -0
  33. data/lib/starter_web/assets/images/pages/features/nav-module-1280x300.jpg +0 -0
  34. data/lib/starter_web/assets/images/pages/features/nbi-barchart-1280x800.jpg +0 -0
  35. data/lib/starter_web/assets/images/pages/features/teaser-banner-1280x600.jpg +0 -0
  36. data/lib/starter_web/assets/images/pages/features/translator-1280x800.jpg +0 -0
  37. data/lib/starter_web/assets/images/sticker/600x600/sticker-new-version.png +0 -0
  38. data/lib/starter_web/assets/images/sticker/scalable/readme +0 -0
  39. data/lib/starter_web/package.json +6 -6
  40. data/lib/starter_web/pages/public/_jupyter/docs/_includes/attributes.asciidoc +67 -0
  41. data/lib/starter_web/pages/public/_jupyter/docs/_includes/documents/j1_docs_example_static.asciidoc +232 -0
  42. data/lib/starter_web/pages/public/_jupyter/docs/binderhub.adoc +631 -0
  43. data/lib/starter_web/pages/public/_jupyter/docs/j1-nbinteract.adoc +638 -0
  44. data/lib/starter_web/pages/public/_jupyter/docs/jupyterhub.adoc +248 -0
  45. data/lib/starter_web/pages/public/_jupyter/docs/nbinteract-widget-manual.adoc +928 -0
  46. data/lib/starter_web/pages/public/_jupyter/examples/distributed/j1-circular-times-table.adoc +139 -0
  47. data/lib/starter_web/pages/public/_jupyter/examples/distributed/j1-common-used-widgets.adoc +229 -0
  48. data/lib/starter_web/pages/public/_jupyter/examples/distributed/j1-odes-in-python.adoc +112 -0
  49. data/lib/starter_web/pages/public/_jupyter/examples/localized/j1-altair/j1-altair-visualisations.adoc +142 -0
  50. data/lib/starter_web/pages/public/_jupyter/examples/localized/j1-bokeh/j1-bokeh-visualisations.adoc +171 -0
  51. data/lib/starter_web/pages/public/_jupyter/examples/localized/j1-bokeh/j1-bqplot-eamples.adoc +111 -0
  52. data/lib/starter_web/pages/public/_jupyter/examples/localized/j1-plotly/j1-plotly-visualisations.adoc +94 -0
  53. data/lib/starter_web/pages/public/_jupyter/examples/localized/j1_climate-change-forecast.adoc +106 -0
  54. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_altair_interactive-checkpoint.ipynb +16260 -0
  55. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_bgplot_line_plot-checkpoint.ipynb +247 -0
  56. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_circular_times_table-Copy1-checkpoint.ipynb +12382 -0
  57. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_circular_times_table-checkpoint.ipynb +12387 -0
  58. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_circular_times_table-short-checkpoint.ipynb +12170 -0
  59. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_climate_change_forecast-checkpoint.ipynb +1058 -0
  60. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_docs_example_dynamic-checkpoint.ipynb +14478 -0
  61. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_interactive_widgets-Copy1-checkpoint.ipynb +379 -0
  62. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_interactive_widgets-checkpoint.ipynb +442 -0
  63. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets-checkpoint.ipynb +523 -0
  64. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets.line_charts-checkpoint.ipynb +84 -0
  65. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets.questions-checkpoint.ipynb +194 -0
  66. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets_bar_chart-checkpoint.ipynb +89 -0
  67. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets_bar_charts-Copy1-checkpoint.ipynb +164 -0
  68. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets_bar_charts-checkpoint.ipynb +173 -0
  69. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets_bar_charts.1-checkpoint.ipynb +256 -0
  70. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets_barcharts-checkpoint.ipynb +126 -0
  71. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets_hist_chart-checkpoint.ipynb +87 -0
  72. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets_line_chart-checkpoint.ipynb +90 -0
  73. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets_line_charts-checkpoint.ipynb +87 -0
  74. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets_question_multiple_choice-checkpoint.ipynb +64 -0
  75. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets_question_short_answer-checkpoint.ipynb +122 -0
  76. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets_questions-checkpoint.ipynb +181 -0
  77. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets_scatter_chart-checkpoint.ipynb +89 -0
  78. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets_scatter_charts-checkpoint.ipynb +175 -0
  79. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets_scatter_drag_chart-checkpoint.ipynb +87 -0
  80. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_ode_selected-checkpoint.ipynb +14478 -0
  81. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_odes_in_python-checkpoint.ipynb +15227 -0
  82. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/factor_by_factor.mp4 +0 -0
  83. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/j1_circular_times_table.ipynb +12382 -0
  84. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/j1_climate_change_forecast.ipynb +1058 -0
  85. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/j1_docs_example_dynamic.ipynb +14478 -0
  86. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/j1_interactive_widgets.ipynb +442 -0
  87. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/j1_nbi_widgets.ipynb +523 -0
  88. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/j1_nbi_widgets_bar_chart.ipynb +89 -0
  89. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/j1_nbi_widgets_hist_chart.ipynb +87 -0
  90. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/j1_nbi_widgets_line_chart.ipynb +90 -0
  91. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/j1_nbi_widgets_question_multiple_choice.ipynb +64 -0
  92. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/j1_nbi_widgets_question_short_answer.ipynb +122 -0
  93. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/j1_nbi_widgets_scatter_chart.ipynb +89 -0
  94. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/j1_nbi_widgets_scatter_drag_chart.ipynb +87 -0
  95. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/j1_odes_in_python.ipynb +15227 -0
  96. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/line_by_line.mp4 +0 -0
  97. data/lib/starter_web/pages/public/_jupyter/notebooks/j1/point_by_point.mp4 +0 -0
  98. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-altair-tutorial/.ipynb_checkpoints/j1_altair_interactive-checkpoint.ipynb +16296 -0
  99. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-altair-tutorial/.ipynb_checkpoints/j1_altair_non_interactive-checkpoint.ipynb +15385 -0
  100. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-altair-tutorial/j1_altair_interactive.ipynb +16296 -0
  101. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-altair-tutorial/j1_altair_non_interactive.ipynb +15385 -0
  102. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/00 - Introduction and Setup-checkpoint.ipynb +717 -0
  103. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/01 - Basic Plotting-checkpoint.ipynb +1381 -0
  104. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/02 - Styling and Theming-checkpoint.ipynb +1440 -0
  105. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/03 - Data Sources and Transformations-checkpoint.ipynb +927 -0
  106. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/04 - Adding Annotations-checkpoint.ipynb +1105 -0
  107. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/05 - Presentation Layouts-checkpoint.ipynb +578 -0
  108. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/06 - Linking and Interactions-checkpoint.ipynb +1196 -0
  109. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/07 - Bar and Categorical Data Plots-checkpoint.ipynb +1681 -0
  110. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/08 - Graph and Network Plots-checkpoint.ipynb +680 -0
  111. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/09 - Geographic Plots-checkpoint.ipynb +693 -0
  112. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/10 - Exporting and Embedding-checkpoint.ipynb +751 -0
  113. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/11 - Running Bokeh Applications-checkpoint.ipynb +770 -0
  114. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/bokeh_tut_00_introduction_and_setup-checkpoint.ipynb +666 -0
  115. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/j1_bokeh_01_basic_plotting-checkpoint.ipynb +1365 -0
  116. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/j1_bokeh_02_styling_and_theming-checkpoint.ipynb +1405 -0
  117. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/j1_bokeh_03_data_sources_and_transformations-checkpoint.ipynb +856 -0
  118. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/j1_bokeh_04_adding_annotations-checkpoint.ipynb +1167 -0
  119. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/j1_bokeh_05_presentation_layouts-checkpoint.ipynb +601 -0
  120. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/j1_bokeh_06_linking_and_interactions-checkpoint.ipynb +1356 -0
  121. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/j1_bokeh_07_bar_and_categorical_data_plots-checkpoint.ipynb +1742 -0
  122. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/j1_bokeh_08_graph_and_network_plots-checkpoint.ipynb +625 -0
  123. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/j1_bokeh_09_geographic_plots-checkpoint.ipynb +685 -0
  124. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/j1_bokeh_10_exporting_and_embedding-checkpoint.ipynb +726 -0
  125. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/j1_bokeh_10_exporting_and_embedding-checkpoint.org +726 -0
  126. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/j1_bokeh_10_exporting_and_embedding.new-checkpoint.ipynb +560 -0
  127. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/j1_bokeh_11_running_bokeh_applications-checkpoint.ipynb +716 -0
  128. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/j1_bokeh_01_basic_plotting.ipynb +1365 -0
  129. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/j1_bokeh_02_styling_and_theming.ipynb +1405 -0
  130. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/j1_bokeh_03_data_sources_and_transformations.ipynb +856 -0
  131. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/j1_bokeh_04_adding_annotations.ipynb +1167 -0
  132. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/j1_bokeh_05_presentation_layouts.ipynb +601 -0
  133. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/j1_bokeh_06_linking_and_interactions.ipynb +1356 -0
  134. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/j1_bokeh_07_bar_and_categorical_data_plots.ipynb +1742 -0
  135. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/j1_bokeh_08_graph_and_network_plots.ipynb +625 -0
  136. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/j1_bokeh_09_geographic_plots.ipynb +685 -0
  137. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bqplot/.ipynb_checkpoints/j1_mathplot_vs_bqplot-checkpoint.ipynb +336 -0
  138. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bqplot/advanced/Feature_Vector_Distribution-Iris-Digits.ipynb +433 -0
  139. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bqplot/j1_bgplot_line_plot.ipynb +244 -0
  140. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bqplot/j1_circular_times_table-short.ipynb +12170 -0
  141. data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bqplot/j1_mathplot_vs_bqplot.ipynb +336 -0
  142. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/.ipynb_checkpoints/Index-checkpoint.ipynb +163 -0
  143. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/.ipynb_checkpoints/Tutorials-checkpoint.ipynb +51 -0
  144. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Advanced Plotting/Advanced Plotting.ipynb +289 -0
  145. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Advanced Plotting/Animations.ipynb +266 -0
  146. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Advanced Plotting/Axis Properties.ipynb +396 -0
  147. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Advanced Plotting/Plotting Dates.ipynb +318 -0
  148. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Applications/Equity Index Performance/Time Series.ipynb +158 -0
  149. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Applications/Equity Index Performance/spx_prices.csv +6799 -0
  150. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Applications/Feature_Vector_Distribution-Iris-Digits.ipynb +470 -0
  151. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Applications/Index.ipynb +49 -0
  152. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Applications/Logs Analytics/Logs Dashboard.ipynb +378 -0
  153. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Applications/Mobile Patent Suits.ipynb +123 -0
  154. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Applications/Neural Network.ipynb +177 -0
  155. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Applications/Outlier Detection.ipynb +311 -0
  156. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Applications/Wealth Of Nations/Bubble Chart.ipynb +255 -0
  157. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Applications/Wealth Of Nations/Choropleth.ipynb +275 -0
  158. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Applications/Wealth Of Nations/nations.json +1 -0
  159. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Applications/Wealth Of Nations/world_map_codes.csv +234 -0
  160. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Basic Plotting/.ipynb_checkpoints/Basic Plotting-checkpoint.ipynb +186 -0
  161. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Basic Plotting/.ipynb_checkpoints/Pyplot-checkpoint.ipynb +794 -0
  162. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Basic Plotting/.ipynb_checkpoints/Untitled-checkpoint.ipynb +323 -0
  163. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Basic Plotting/Basic Plotting.ipynb +261 -0
  164. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Basic Plotting/Pyplot.ipynb +1489 -0
  165. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Index.ipynb +163 -0
  166. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Interactions/Interaction Layer.ipynb +966 -0
  167. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Interactions/Mark Interactions.ipynb +476 -0
  168. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Interactions/Selectors.ipynb +427 -0
  169. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Introduction.ipynb +528 -0
  170. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/Bars.ipynb +480 -0
  171. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/Bins.ipynb +217 -0
  172. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/Boxplot.ipynb +253 -0
  173. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/Candles.ipynb +225 -0
  174. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/FlexLine.ipynb +123 -0
  175. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/Graph.ipynb +357 -0
  176. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/GridHeatMap.ipynb +422 -0
  177. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/HeatMap.ipynb +157 -0
  178. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/Hist.ipynb +176 -0
  179. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/Image.ipynb +195 -0
  180. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/Label.ipynb +189 -0
  181. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/Lines.ipynb +565 -0
  182. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/Map.ipynb +182 -0
  183. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/Market Map.ipynb +315 -0
  184. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/Pie.ipynb +465 -0
  185. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/Scatter.ipynb +835 -0
  186. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Pyplot/Bars.ipynb +362 -0
  187. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Pyplot/Bins.ipynb +252 -0
  188. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Pyplot/Boxplot.ipynb +273 -0
  189. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Pyplot/Candles.ipynb +242 -0
  190. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Pyplot/GridHeatMap.ipynb +417 -0
  191. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Pyplot/HeatMap.ipynb +155 -0
  192. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Pyplot/Hist.ipynb +238 -0
  193. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Pyplot/Image.ipynb +152 -0
  194. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Pyplot/Label.ipynb +206 -0
  195. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Pyplot/Lines.ipynb +474 -0
  196. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Pyplot/Map.ipynb +181 -0
  197. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Pyplot/Pie.ipynb +310 -0
  198. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Pyplot/Scatter.ipynb +702 -0
  199. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Scales/Color Scales.ipynb +495 -0
  200. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Tutorials/.ipynb_checkpoints/Feature_Vector_Distribution-Iris-Digits-checkpoint.ipynb +433 -0
  201. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Tutorials/.ipynb_checkpoints/Linking Plots With Widgets-checkpoint.ipynb +326 -0
  202. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Tutorials/.ipynb_checkpoints/Updating Plots-Copy1-checkpoint.ipynb +177 -0
  203. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Tutorials/.ipynb_checkpoints/Updating Plots-checkpoint.ipynb +177 -0
  204. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Tutorials/Brush Interval Selector.ipynb +154 -0
  205. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Tutorials/Fast Interval Selector.ipynb +152 -0
  206. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Tutorials/Gaussian Density Widget.ipynb +128 -0
  207. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Tutorials/Gaussian Density.ipynb +113 -0
  208. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Tutorials/Linking Plots With Widgets.ipynb +326 -0
  209. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Tutorials/Object Model.ipynb +179 -0
  210. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Tutorials/Pyplot.ipynb +174 -0
  211. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Tutorials/Updating Plots.ipynb +177 -0
  212. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Tutorials.ipynb +51 -0
  213. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/data_files/country_codes.csv +213 -0
  214. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/data_files/gdp_per_capita.csv +56 -0
  215. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/data_files/state_codes.csv +52 -0
  216. data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/data_files/trees.jpg +0 -0
  217. data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/.ipynb_checkpoints/nbi_docs_examples_central_limit_theorem-checkpoint.ipynb +247 -0
  218. data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/.ipynb_checkpoints/nbi_docs_examples_variability_of_the_sample_mean-checkpoint.ipynb +323 -0
  219. data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/.ipynb_checkpoints/nbi_docs_recipes_graphing-checkpoint.ipynb +387 -0
  220. data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/.ipynb_checkpoints/nbi_docs_recipes_interactive_questions-checkpoint.ipynb +185 -0
  221. data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/.ipynb_checkpoints/nbi_docs_recipes_layout-checkpoint.ipynb +384 -0
  222. data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/.ipynb_checkpoints/nbi_docs_tutorial_interact-checkpoint.ipynb +254 -0
  223. data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/.ipynb_checkpoints/nbi_docs_tutorial_monty_hall-checkpoint.ipynb +732 -0
  224. data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/nbi_docs_examples_central_limit_theorem.ipynb +247 -0
  225. data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/nbi_docs_examples_correlation.ipynb +651 -0
  226. data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/nbi_docs_examples_empirical_distributions.ipynb +773 -0
  227. data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/nbi_docs_examples_linear_regression.ipynb +111 -0
  228. data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/nbi_docs_examples_probability_distribution_plots.ipynb +199 -0
  229. data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/nbi_docs_examples_sampling_from_a_population.ipynb +421 -0
  230. data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/nbi_docs_examples_variability_of_the_sample_mean.ipynb +323 -0
  231. data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/nbi_docs_recipes_graphing.ipynb +387 -0
  232. data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/nbi_docs_recipes_interactive_questions.ipynb +185 -0
  233. data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/nbi_docs_recipes_layout.ipynb +384 -0
  234. data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/nbi_docs_tutorial_interact.ipynb +254 -0
  235. data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/nbi_docs_tutorial_monty_hall.ipynb +732 -0
  236. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Advanced Plotting.html +373 -0
  237. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Animations.html +361 -0
  238. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Axis Properties.html +569 -0
  239. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Bars.html +487 -0
  240. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Basic Plotting.html +341 -0
  241. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Bins.html +259 -0
  242. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Boxplot.html +277 -0
  243. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Brush Interval Selector.html +182 -0
  244. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Bubble Chart.html +299 -0
  245. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Candles.html +252 -0
  246. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Choropleth.html +318 -0
  247. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Color Scales.html +514 -0
  248. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Fast Interval Selector.html +182 -0
  249. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Feature_Vector_Distribution-Iris-Digits.html +479 -0
  250. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/FlexLine.html +128 -0
  251. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Gaussian Density Widget.html +152 -0
  252. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Gaussian Density.html +137 -0
  253. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Graph.html +484 -0
  254. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/GridHeatMap.html +483 -0
  255. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/HeatMap.html +170 -0
  256. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Hist.html +349 -0
  257. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Image.html +177 -0
  258. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Index.html +29 -0
  259. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Interaction Layer.html +1372 -0
  260. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Introduction.html +749 -0
  261. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Label.html +268 -0
  262. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Lines.html +704 -0
  263. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Linking Plots With Widgets.html +389 -0
  264. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Logs Dashboard.html +455 -0
  265. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Map.html +229 -0
  266. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Mark Interactions.html +613 -0
  267. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Market Map.html +413 -0
  268. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Mobile Patent Suits.html +131 -0
  269. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Neural Network.html +190 -0
  270. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Object Model.html +193 -0
  271. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Outlier Detection.html +363 -0
  272. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Pie.html +367 -0
  273. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Plotting Dates.html +337 -0
  274. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Pyplot.html +196 -0
  275. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Scatter.html +948 -0
  276. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Selectors.html +489 -0
  277. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Time Series.html +173 -0
  278. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Tutorials.html +40 -0
  279. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Updating Plots.html +228 -0
  280. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_altair_interactive.html +2216 -0
  281. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_altair_non_interactive.html +1170 -0
  282. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_bgplot_line_plot.html +318 -0
  283. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_bokeh_01_basic_plotting.html +1479 -0
  284. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_bokeh_02_styling_and_theming.html +1524 -0
  285. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_bokeh_03_data_sources_and_transformations.html +983 -0
  286. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_bokeh_04_adding_annotations.html +1280 -0
  287. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_bokeh_05_presentation_layouts.html +660 -0
  288. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_bokeh_06_linking_and_interactions.html +1563 -0
  289. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_bokeh_07_bar_and_categorical_data_plots.html +1888 -0
  290. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_bokeh_08_graph_and_network_plots.html +689 -0
  291. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_bokeh_09_geographic_plots.html +767 -0
  292. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_circular_times_table-short.html +475 -0
  293. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_circular_times_table.html +747 -0
  294. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_climate_change_forecast.html +1250 -0
  295. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_docs_example_dynamic.html +186 -0
  296. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_interactive_widgets.html +512 -0
  297. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_mathplot_vs_bqplot.html +407 -0
  298. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_nbi_widgets.html +629 -0
  299. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_nbi_widgets_bar_chart.html +95 -0
  300. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_nbi_widgets_hist_chart.html +93 -0
  301. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_nbi_widgets_line_chart.html +96 -0
  302. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_nbi_widgets_question_multiple_choice.html +70 -0
  303. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_nbi_widgets_question_short_answer.html +156 -0
  304. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_nbi_widgets_scatter_chart.html +95 -0
  305. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_nbi_widgets_scatter_drag_chart.html +93 -0
  306. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_odes_in_python.html +955 -0
  307. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/nbi_docs_examples_central_limit_theorem.html +290 -0
  308. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/nbi_docs_examples_correlation.html +818 -0
  309. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/nbi_docs_examples_empirical_distributions.html +351 -0
  310. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/nbi_docs_examples_linear_regression.html +106 -0
  311. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/nbi_docs_examples_probability_distribution_plots.html +228 -0
  312. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/nbi_docs_examples_sampling_from_a_population.html +518 -0
  313. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/nbi_docs_examples_variability_of_the_sample_mean.html +372 -0
  314. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/nbi_docs_recipes_graphing.html +473 -0
  315. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/nbi_docs_recipes_interactive_questions.html +242 -0
  316. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/nbi_docs_recipes_layout.html +496 -0
  317. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/nbi_docs_tutorial_interact.html +329 -0
  318. data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/nbi_docs_tutorial_monty_hall.html +866 -0
  319. data/lib/starter_web/pages/public/_jupyter/where_to_go.adoc +270 -0
  320. data/lib/starter_web/pages/public/features/general.adoc +74 -33
  321. data/lib/starter_web/pages/public/features/template.adoc +159 -68
  322. data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_interactive_widgets.html +512 -512
  323. data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_nbi_widgets.html +629 -629
  324. data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_nbi_widgets_bar_chart.html +95 -95
  325. data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_nbi_widgets_hist_chart.html +93 -93
  326. data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_nbi_widgets_line_chart.html +96 -96
  327. data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_nbi_widgets_question_multiple_choice.html +70 -70
  328. data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_nbi_widgets_question_short_answer.html +156 -156
  329. data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_nbi_widgets_scatter_chart.html +95 -95
  330. data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_nbi_widgets_scatter_drag_chart.html +93 -93
  331. data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_odes_in_python.html +955 -955
  332. data/lib/starter_web/pages/public/learn/_roundtrip/100_present_images.adoc +313 -0
  333. data/lib/starter_web/pages/public/learn/_roundtrip/100_present_videos.adoc +281 -0
  334. data/lib/starter_web/pages/public/learn/_roundtrip/200_typography.adoc +253 -0
  335. data/lib/starter_web/pages/public/learn/_roundtrip/300_icon_fonts.adoc +579 -0
  336. data/lib/starter_web/pages/public/learn/_roundtrip/400_asciidoc_extensions.adoc +718 -0
  337. data/lib/starter_web/pages/public/learn/_roundtrip/410_bs_modals_extentions.adoc +91 -0
  338. data/lib/starter_web/pages/public/learn/_roundtrip/420_responsive_tables_extensions.adoc +420 -0
  339. data/lib/starter_web/pages/public/learn/_roundtrip/500_themes.adoc +250 -0
  340. data/lib/starter_web/pages/public/learn/_roundtrip/600_quicksearch.adoc +425 -0
  341. data/lib/starter_web/pages/public/learn/_roundtrip/_includes/attributes.asciidoc +118 -0
  342. data/lib/starter_web/pages/public/learn/_roundtrip/_includes/documents/100_gistblock.asciidoc +28 -0
  343. data/lib/starter_web/pages/public/learn/_roundtrip/_includes/documents/410_bottom_info.asciidoc +14 -0
  344. data/lib/starter_web/pages/public/learn/_roundtrip/_includes/documents/410_bottom_left_warning.asciidoc +11 -0
  345. data/lib/starter_web/pages/public/learn/_roundtrip/_includes/documents/410_bottom_right_danger.asciidoc +11 -0
  346. data/lib/starter_web/pages/public/learn/_roundtrip/_includes/documents/410_central_success.asciidoc +11 -0
  347. data/lib/starter_web/pages/public/learn/_roundtrip/_includes/documents/410_full_height_left_info.asciidoc +11 -0
  348. data/lib/starter_web/pages/public/learn/_roundtrip/_includes/documents/410_full_height_right_success.asciidoc +11 -0
  349. data/lib/starter_web/pages/public/learn/_roundtrip/_includes/documents/410_table_bs_modal_examples.asciidoc +47 -0
  350. data/lib/starter_web/pages/public/learn/_roundtrip/_includes/documents/410_top_info.asciidoc +11 -0
  351. data/lib/starter_web/pages/public/learn/_roundtrip/_includes/documents/410_top_left_info.asciidoc +11 -0
  352. data/lib/starter_web/pages/public/learn/_roundtrip/_includes/documents/410_top_right_success.asciidoc +11 -0
  353. data/lib/starter_web/pages/public/learn/_roundtrip/_includes/documents/419_advanced_modals_demo.asciidoc +337 -0
  354. data/lib/starter_web/pages/public/learn/_roundtrip/_includes/documents/tables/bs_modal_examples.asciidoc +47 -0
  355. data/lib/starter_web/pages/public/learn/_roundtrip/_includes/google-ad.js +130 -0
  356. data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.adoc +6 -5
  357. data/lib/starter_web/pages/public/learn/roundtrip/300_icon_fonts.adoc +1 -2
  358. data/lib/starter_web/pages/public/learn/roundtrip/400_asciidoc_extensions.adoc +4 -2
  359. data/lib/starter_web/pages/public/learn/roundtrip/500_themes.adoc +1 -1
  360. data/lib/starter_web/pages/public/learn/roundtrip/_includes/attributes.asciidoc +1 -1
  361. data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
  362. data/lib/starter_web/utilsrv/package.json +1 -1
  363. metadata +384 -17
  364. data/lib/starter_web/_includes/_attributes.asciidoc +0 -575
  365. data/lib/starter_web/assets/images/pages/features/bootswatch-themes-1080x800.jpg +0 -0
  366. data/lib/starter_web/assets/images/pages/features/comments-1080x600.jpg +0 -0
  367. data/lib/starter_web/assets/images/pages/features/cookie-consent-1080x800.jpg +0 -0
  368. data/lib/starter_web/assets/images/pages/features/example-content-present-videos-1080x800.jpg +0 -0
  369. data/lib/starter_web/assets/images/pages/features/fab-1080x500.jpg +0 -0
  370. data/lib/starter_web/assets/images/pages/features/full-text-search-1080x800.jpg +0 -0
  371. data/lib/starter_web/assets/images/pages/features/global-mobile-traffic-1920x1080.jpg +0 -0
  372. data/lib/starter_web/assets/images/pages/features/google-lighthouse-1080x300.jpg +0 -0
  373. data/lib/starter_web/assets/images/pages/features/intro-panel-1080x800.jpg +0 -0
  374. data/lib/starter_web/assets/images/pages/features/mobile-navigation-600x800.jpg +0 -0
  375. data/lib/starter_web/assets/images/pages/features/native-speakers-by-language.jpg +0 -0
  376. data/lib/starter_web/assets/images/pages/features/nav-module-1080x300.jpg +0 -0
  377. data/lib/starter_web/assets/images/pages/features/teaser-banner-1080x600.jpg +0 -0
  378. data/lib/starter_web/assets/images/pages/features/translator-1080x800.jpg +0 -0
@@ -0,0 +1,680 @@
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "markdown",
5
+ "metadata": {},
6
+ "source": [
7
+ "<table style=\"float:left; border:none\">\n",
8
+ " <tr style=\"border:none\">\n",
9
+ " <td style=\"border:none\">\n",
10
+ " <a href=\"https://bokeh.org/\"> \n",
11
+ " <img \n",
12
+ " src=\"assets/bokeh-transparent.png\" \n",
13
+ " style=\"width:50px\"\n",
14
+ " >\n",
15
+ " </a> \n",
16
+ " </td>\n",
17
+ " <td style=\"border:none\">\n",
18
+ " <h1>Bokeh Tutorial</h1>\n",
19
+ " </td>\n",
20
+ " </tr>\n",
21
+ "</table>\n",
22
+ "\n",
23
+ "<div style=\"float:right;\"><h2>08. Graph and Network Plots</h2></div>"
24
+ ]
25
+ },
26
+ {
27
+ "cell_type": "markdown",
28
+ "metadata": {},
29
+ "source": [
30
+ "This chapter will cover how to plot network node/link graphs in Bokeh using NetworkX. For information on creating graph renderers from a low level, see [Visualizing Network Graphs](https://docs.bokeh.org/en/latest/docs/user_guide/graph.html)\n"
31
+ ]
32
+ },
33
+ {
34
+ "cell_type": "code",
35
+ "execution_count": 1,
36
+ "metadata": {},
37
+ "outputs": [
38
+ {
39
+ "data": {
40
+ "text/html": [
41
+ "<div class=\"bk-root\">\n",
42
+ " <a href=\"https://bokeh.org\" target=\"_blank\" class=\"bk-logo bk-logo-small bk-logo-notebook\"></a>\n",
43
+ " <span id=\"1002\">Loading BokehJS ...</span>\n",
44
+ " </div>\n"
45
+ ]
46
+ },
47
+ "metadata": {},
48
+ "output_type": "display_data"
49
+ },
50
+ {
51
+ "data": {
52
+ "application/javascript": [
53
+ "(function(root) {\n",
54
+ " function now() {\n",
55
+ " return new Date();\n",
56
+ " }\n",
57
+ "\n",
58
+ " const force = true;\n",
59
+ "\n",
60
+ " if (typeof root._bokeh_onload_callbacks === \"undefined\" || force === true) {\n",
61
+ " root._bokeh_onload_callbacks = [];\n",
62
+ " root._bokeh_is_loading = undefined;\n",
63
+ " }\n",
64
+ "\n",
65
+ "const JS_MIME_TYPE = 'application/javascript';\n",
66
+ " const HTML_MIME_TYPE = 'text/html';\n",
67
+ " const EXEC_MIME_TYPE = 'application/vnd.bokehjs_exec.v0+json';\n",
68
+ " const CLASS_NAME = 'output_bokeh rendered_html';\n",
69
+ "\n",
70
+ " /**\n",
71
+ " * Render data to the DOM node\n",
72
+ " */\n",
73
+ " function render(props, node) {\n",
74
+ " const script = document.createElement(\"script\");\n",
75
+ " node.appendChild(script);\n",
76
+ " }\n",
77
+ "\n",
78
+ " /**\n",
79
+ " * Handle when an output is cleared or removed\n",
80
+ " */\n",
81
+ " function handleClearOutput(event, handle) {\n",
82
+ " const cell = handle.cell;\n",
83
+ "\n",
84
+ " const id = cell.output_area._bokeh_element_id;\n",
85
+ " const server_id = cell.output_area._bokeh_server_id;\n",
86
+ " // Clean up Bokeh references\n",
87
+ " if (id != null && id in Bokeh.index) {\n",
88
+ " Bokeh.index[id].model.document.clear();\n",
89
+ " delete Bokeh.index[id];\n",
90
+ " }\n",
91
+ "\n",
92
+ " if (server_id !== undefined) {\n",
93
+ " // Clean up Bokeh references\n",
94
+ " const cmd_clean = \"from bokeh.io.state import curstate; print(curstate().uuid_to_server['\" + server_id + \"'].get_sessions()[0].document.roots[0]._id)\";\n",
95
+ " cell.notebook.kernel.execute(cmd_clean, {\n",
96
+ " iopub: {\n",
97
+ " output: function(msg) {\n",
98
+ " const id = msg.content.text.trim();\n",
99
+ " if (id in Bokeh.index) {\n",
100
+ " Bokeh.index[id].model.document.clear();\n",
101
+ " delete Bokeh.index[id];\n",
102
+ " }\n",
103
+ " }\n",
104
+ " }\n",
105
+ " });\n",
106
+ " // Destroy server and session\n",
107
+ " const cmd_destroy = \"import bokeh.io.notebook as ion; ion.destroy_server('\" + server_id + \"')\";\n",
108
+ " cell.notebook.kernel.execute(cmd_destroy);\n",
109
+ " }\n",
110
+ " }\n",
111
+ "\n",
112
+ " /**\n",
113
+ " * Handle when a new output is added\n",
114
+ " */\n",
115
+ " function handleAddOutput(event, handle) {\n",
116
+ " const output_area = handle.output_area;\n",
117
+ " const output = handle.output;\n",
118
+ "\n",
119
+ " // limit handleAddOutput to display_data with EXEC_MIME_TYPE content only\n",
120
+ " if ((output.output_type != \"display_data\") || (!Object.prototype.hasOwnProperty.call(output.data, EXEC_MIME_TYPE))) {\n",
121
+ " return\n",
122
+ " }\n",
123
+ "\n",
124
+ " const toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n",
125
+ "\n",
126
+ " if (output.metadata[EXEC_MIME_TYPE][\"id\"] !== undefined) {\n",
127
+ " toinsert[toinsert.length - 1].firstChild.textContent = output.data[JS_MIME_TYPE];\n",
128
+ " // store reference to embed id on output_area\n",
129
+ " output_area._bokeh_element_id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n",
130
+ " }\n",
131
+ " if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n",
132
+ " const bk_div = document.createElement(\"div\");\n",
133
+ " bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n",
134
+ " const script_attrs = bk_div.children[0].attributes;\n",
135
+ " for (let i = 0; i < script_attrs.length; i++) {\n",
136
+ " toinsert[toinsert.length - 1].firstChild.setAttribute(script_attrs[i].name, script_attrs[i].value);\n",
137
+ " toinsert[toinsert.length - 1].firstChild.textContent = bk_div.children[0].textContent\n",
138
+ " }\n",
139
+ " // store reference to server id on output_area\n",
140
+ " output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n",
141
+ " }\n",
142
+ " }\n",
143
+ "\n",
144
+ " function register_renderer(events, OutputArea) {\n",
145
+ "\n",
146
+ " function append_mime(data, metadata, element) {\n",
147
+ " // create a DOM node to render to\n",
148
+ " const toinsert = this.create_output_subarea(\n",
149
+ " metadata,\n",
150
+ " CLASS_NAME,\n",
151
+ " EXEC_MIME_TYPE\n",
152
+ " );\n",
153
+ " this.keyboard_manager.register_events(toinsert);\n",
154
+ " // Render to node\n",
155
+ " const props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n",
156
+ " render(props, toinsert[toinsert.length - 1]);\n",
157
+ " element.append(toinsert);\n",
158
+ " return toinsert\n",
159
+ " }\n",
160
+ "\n",
161
+ " /* Handle when an output is cleared or removed */\n",
162
+ " events.on('clear_output.CodeCell', handleClearOutput);\n",
163
+ " events.on('delete.Cell', handleClearOutput);\n",
164
+ "\n",
165
+ " /* Handle when a new output is added */\n",
166
+ " events.on('output_added.OutputArea', handleAddOutput);\n",
167
+ "\n",
168
+ " /**\n",
169
+ " * Register the mime type and append_mime function with output_area\n",
170
+ " */\n",
171
+ " OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n",
172
+ " /* Is output safe? */\n",
173
+ " safe: true,\n",
174
+ " /* Index of renderer in `output_area.display_order` */\n",
175
+ " index: 0\n",
176
+ " });\n",
177
+ " }\n",
178
+ "\n",
179
+ " // register the mime type if in Jupyter Notebook environment and previously unregistered\n",
180
+ " if (root.Jupyter !== undefined) {\n",
181
+ " const events = require('base/js/events');\n",
182
+ " const OutputArea = require('notebook/js/outputarea').OutputArea;\n",
183
+ "\n",
184
+ " if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n",
185
+ " register_renderer(events, OutputArea);\n",
186
+ " }\n",
187
+ " }\n",
188
+ " if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n",
189
+ " root._bokeh_timeout = Date.now() + 5000;\n",
190
+ " root._bokeh_failed_load = false;\n",
191
+ " }\n",
192
+ "\n",
193
+ " const NB_LOAD_WARNING = {'data': {'text/html':\n",
194
+ " \"<div style='background-color: #fdd'>\\n\"+\n",
195
+ " \"<p>\\n\"+\n",
196
+ " \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n",
197
+ " \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n",
198
+ " \"</p>\\n\"+\n",
199
+ " \"<ul>\\n\"+\n",
200
+ " \"<li>re-rerun `output_notebook()` to attempt to load from CDN again, or</li>\\n\"+\n",
201
+ " \"<li>use INLINE resources instead, as so:</li>\\n\"+\n",
202
+ " \"</ul>\\n\"+\n",
203
+ " \"<code>\\n\"+\n",
204
+ " \"from bokeh.resources import INLINE\\n\"+\n",
205
+ " \"output_notebook(resources=INLINE)\\n\"+\n",
206
+ " \"</code>\\n\"+\n",
207
+ " \"</div>\"}};\n",
208
+ "\n",
209
+ " function display_loaded() {\n",
210
+ " const el = document.getElementById(\"1002\");\n",
211
+ " if (el != null) {\n",
212
+ " el.textContent = \"BokehJS is loading...\";\n",
213
+ " }\n",
214
+ " if (root.Bokeh !== undefined) {\n",
215
+ " if (el != null) {\n",
216
+ " el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n",
217
+ " }\n",
218
+ " } else if (Date.now() < root._bokeh_timeout) {\n",
219
+ " setTimeout(display_loaded, 100)\n",
220
+ " }\n",
221
+ " }\n",
222
+ "\n",
223
+ " function run_callbacks() {\n",
224
+ " try {\n",
225
+ " root._bokeh_onload_callbacks.forEach(function(callback) {\n",
226
+ " if (callback != null)\n",
227
+ " callback();\n",
228
+ " });\n",
229
+ " } finally {\n",
230
+ " delete root._bokeh_onload_callbacks\n",
231
+ " }\n",
232
+ " console.debug(\"Bokeh: all callbacks have finished\");\n",
233
+ " }\n",
234
+ "\n",
235
+ " function load_libs(css_urls, js_urls, callback) {\n",
236
+ " if (css_urls == null) css_urls = [];\n",
237
+ " if (js_urls == null) js_urls = [];\n",
238
+ "\n",
239
+ " root._bokeh_onload_callbacks.push(callback);\n",
240
+ " if (root._bokeh_is_loading > 0) {\n",
241
+ " console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n",
242
+ " return null;\n",
243
+ " }\n",
244
+ " if (js_urls == null || js_urls.length === 0) {\n",
245
+ " run_callbacks();\n",
246
+ " return null;\n",
247
+ " }\n",
248
+ " console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n",
249
+ " root._bokeh_is_loading = css_urls.length + js_urls.length;\n",
250
+ "\n",
251
+ " function on_load() {\n",
252
+ " root._bokeh_is_loading--;\n",
253
+ " if (root._bokeh_is_loading === 0) {\n",
254
+ " console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n",
255
+ " run_callbacks()\n",
256
+ " }\n",
257
+ " }\n",
258
+ "\n",
259
+ " function on_error(url) {\n",
260
+ " console.error(\"failed to load \" + url);\n",
261
+ " }\n",
262
+ "\n",
263
+ " for (let i = 0; i < css_urls.length; i++) {\n",
264
+ " const url = css_urls[i];\n",
265
+ " const element = document.createElement(\"link\");\n",
266
+ " element.onload = on_load;\n",
267
+ " element.onerror = on_error.bind(null, url);\n",
268
+ " element.rel = \"stylesheet\";\n",
269
+ " element.type = \"text/css\";\n",
270
+ " element.href = url;\n",
271
+ " console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n",
272
+ " document.body.appendChild(element);\n",
273
+ " }\n",
274
+ "\n",
275
+ " for (let i = 0; i < js_urls.length; i++) {\n",
276
+ " const url = js_urls[i];\n",
277
+ " const element = document.createElement('script');\n",
278
+ " element.onload = on_load;\n",
279
+ " element.onerror = on_error.bind(null, url);\n",
280
+ " element.async = false;\n",
281
+ " element.src = url;\n",
282
+ " console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n",
283
+ " document.head.appendChild(element);\n",
284
+ " }\n",
285
+ " };\n",
286
+ "\n",
287
+ " function inject_raw_css(css) {\n",
288
+ " const element = document.createElement(\"style\");\n",
289
+ " element.appendChild(document.createTextNode(css));\n",
290
+ " document.body.appendChild(element);\n",
291
+ " }\n",
292
+ "\n",
293
+ " const js_urls = [\"https://cdn.bokeh.org/bokeh/release/bokeh-2.4.3.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-2.4.3.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-2.4.3.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-2.4.3.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-mathjax-2.4.3.min.js\"];\n",
294
+ " const css_urls = [];\n",
295
+ "\n",
296
+ " const inline_js = [ function(Bokeh) {\n",
297
+ " Bokeh.set_log_level(\"info\");\n",
298
+ " },\n",
299
+ "function(Bokeh) {\n",
300
+ " }\n",
301
+ " ];\n",
302
+ "\n",
303
+ " function run_inline_js() {\n",
304
+ " if (root.Bokeh !== undefined || force === true) {\n",
305
+ " for (let i = 0; i < inline_js.length; i++) {\n",
306
+ " inline_js[i].call(root, root.Bokeh);\n",
307
+ " }\n",
308
+ "if (force === true) {\n",
309
+ " display_loaded();\n",
310
+ " }} else if (Date.now() < root._bokeh_timeout) {\n",
311
+ " setTimeout(run_inline_js, 100);\n",
312
+ " } else if (!root._bokeh_failed_load) {\n",
313
+ " console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n",
314
+ " root._bokeh_failed_load = true;\n",
315
+ " } else if (force !== true) {\n",
316
+ " const cell = $(document.getElementById(\"1002\")).parents('.cell').data().cell;\n",
317
+ " cell.output_area.append_execute_result(NB_LOAD_WARNING)\n",
318
+ " }\n",
319
+ " }\n",
320
+ "\n",
321
+ " if (root._bokeh_is_loading === 0) {\n",
322
+ " console.debug(\"Bokeh: BokehJS loaded, going straight to plotting\");\n",
323
+ " run_inline_js();\n",
324
+ " } else {\n",
325
+ " load_libs(css_urls, js_urls, function() {\n",
326
+ " console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n",
327
+ " run_inline_js();\n",
328
+ " });\n",
329
+ " }\n",
330
+ "}(window));"
331
+ ],
332
+ "application/vnd.bokehjs_load.v0+json": "(function(root) {\n function now() {\n return new Date();\n }\n\n const force = true;\n\n if (typeof root._bokeh_onload_callbacks === \"undefined\" || force === true) {\n root._bokeh_onload_callbacks = [];\n root._bokeh_is_loading = undefined;\n }\n\n\n if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n root._bokeh_timeout = Date.now() + 5000;\n root._bokeh_failed_load = false;\n }\n\n const NB_LOAD_WARNING = {'data': {'text/html':\n \"<div style='background-color: #fdd'>\\n\"+\n \"<p>\\n\"+\n \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n \"</p>\\n\"+\n \"<ul>\\n\"+\n \"<li>re-rerun `output_notebook()` to attempt to load from CDN again, or</li>\\n\"+\n \"<li>use INLINE resources instead, as so:</li>\\n\"+\n \"</ul>\\n\"+\n \"<code>\\n\"+\n \"from bokeh.resources import INLINE\\n\"+\n \"output_notebook(resources=INLINE)\\n\"+\n \"</code>\\n\"+\n \"</div>\"}};\n\n function display_loaded() {\n const el = document.getElementById(\"1002\");\n if (el != null) {\n el.textContent = \"BokehJS is loading...\";\n }\n if (root.Bokeh !== undefined) {\n if (el != null) {\n el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n }\n } else if (Date.now() < root._bokeh_timeout) {\n setTimeout(display_loaded, 100)\n }\n }\n\n function run_callbacks() {\n try {\n root._bokeh_onload_callbacks.forEach(function(callback) {\n if (callback != null)\n callback();\n });\n } finally {\n delete root._bokeh_onload_callbacks\n }\n console.debug(\"Bokeh: all callbacks have finished\");\n }\n\n function load_libs(css_urls, js_urls, callback) {\n if (css_urls == null) css_urls = [];\n if (js_urls == null) js_urls = [];\n\n root._bokeh_onload_callbacks.push(callback);\n if (root._bokeh_is_loading > 0) {\n console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n return null;\n }\n if (js_urls == null || js_urls.length === 0) {\n run_callbacks();\n return null;\n }\n console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n root._bokeh_is_loading = css_urls.length + js_urls.length;\n\n function on_load() {\n root._bokeh_is_loading--;\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n run_callbacks()\n }\n }\n\n function on_error(url) {\n console.error(\"failed to load \" + url);\n }\n\n for (let i = 0; i < css_urls.length; i++) {\n const url = css_urls[i];\n const element = document.createElement(\"link\");\n element.onload = on_load;\n element.onerror = on_error.bind(null, url);\n element.rel = \"stylesheet\";\n element.type = \"text/css\";\n element.href = url;\n console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n document.body.appendChild(element);\n }\n\n for (let i = 0; i < js_urls.length; i++) {\n const url = js_urls[i];\n const element = document.createElement('script');\n element.onload = on_load;\n element.onerror = on_error.bind(null, url);\n element.async = false;\n element.src = url;\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.head.appendChild(element);\n }\n };\n\n function inject_raw_css(css) {\n const element = document.createElement(\"style\");\n element.appendChild(document.createTextNode(css));\n document.body.appendChild(element);\n }\n\n const js_urls = [\"https://cdn.bokeh.org/bokeh/release/bokeh-2.4.3.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-2.4.3.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-2.4.3.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-2.4.3.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-mathjax-2.4.3.min.js\"];\n const css_urls = [];\n\n const inline_js = [ function(Bokeh) {\n Bokeh.set_log_level(\"info\");\n },\nfunction(Bokeh) {\n }\n ];\n\n function run_inline_js() {\n if (root.Bokeh !== undefined || force === true) {\n for (let i = 0; i < inline_js.length; i++) {\n inline_js[i].call(root, root.Bokeh);\n }\nif (force === true) {\n display_loaded();\n }} else if (Date.now() < root._bokeh_timeout) {\n setTimeout(run_inline_js, 100);\n } else if (!root._bokeh_failed_load) {\n console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n root._bokeh_failed_load = true;\n } else if (force !== true) {\n const cell = $(document.getElementById(\"1002\")).parents('.cell').data().cell;\n cell.output_area.append_execute_result(NB_LOAD_WARNING)\n }\n }\n\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: BokehJS loaded, going straight to plotting\");\n run_inline_js();\n } else {\n load_libs(css_urls, js_urls, function() {\n console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n run_inline_js();\n });\n }\n}(window));"
333
+ },
334
+ "metadata": {},
335
+ "output_type": "display_data"
336
+ }
337
+ ],
338
+ "source": [
339
+ "from bokeh.io import show, output_notebook\n",
340
+ "from bokeh.plotting import figure\n",
341
+ "\n",
342
+ "output_notebook()"
343
+ ]
344
+ },
345
+ {
346
+ "cell_type": "markdown",
347
+ "metadata": {},
348
+ "source": [
349
+ "## Plotting from NetworkX\n",
350
+ "\n",
351
+ "The easiest way to plot network graphs with Bokeh is to use the `from_networkx` function. This function accepts any NetworkX graph and returns a Bokeh `GraphRenderer` that can be added to a plot. The `GraphRenderer` has `node_renderer` and `edge_renderer` properties that contain the Bokeh renderers that draw the nodes and edges, respectively. \n",
352
+ "\n",
353
+ "The example below shows a Bokeh plot of `nx.desargues_graph()`, setting some of the node and edge properties."
354
+ ]
355
+ },
356
+ {
357
+ "cell_type": "code",
358
+ "execution_count": 2,
359
+ "metadata": {},
360
+ "outputs": [
361
+ {
362
+ "data": {
363
+ "text/html": [
364
+ "\n",
365
+ " <div class=\"bk-root\" id=\"e9510b35-b0ed-4285-9c8b-78fb2a3833c1\" data-root-id=\"1005\"></div>\n"
366
+ ]
367
+ },
368
+ "metadata": {},
369
+ "output_type": "display_data"
370
+ },
371
+ {
372
+ "data": {
373
+ "application/javascript": [
374
+ "(function(root) {\n",
375
+ " function embed_document(root) {\n",
376
+ " const docs_json = {\"99e54df0-baf2-4a27-b383-844ea53d50ee\":{\"defs\":[],\"roots\":{\"references\":[{\"attributes\":{\"renderers\":[{\"id\":\"1008\"}],\"title\":{\"id\":\"1028\"},\"toolbar\":{\"id\":\"1029\"},\"x_range\":{\"id\":\"1003\"},\"x_scale\":{\"id\":\"1026\"},\"y_range\":{\"id\":\"1004\"},\"y_scale\":{\"id\":\"1027\"}},\"id\":\"1005\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"1026\",\"type\":\"LinearScale\"},{\"attributes\":{\"end\":2,\"start\":-2},\"id\":\"1004\",\"type\":\"Range1d\"},{\"attributes\":{\"data\":{\"index\":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]},\"selected\":{\"id\":\"1041\"},\"selection_policy\":{\"id\":\"1040\"}},\"id\":\"1010\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1010\"},\"glyph\":{\"id\":\"1009\"},\"group\":null,\"hover_glyph\":null,\"view\":{\"id\":\"1012\"}},\"id\":\"1011\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1043\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1029\",\"type\":\"Toolbar\"},{\"attributes\":{\"fill_color\":{\"value\":\"orange\"},\"size\":{\"value\":20}},\"id\":\"1009\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"1042\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"end\":2,\"start\":-2},\"id\":\"1003\",\"type\":\"Range1d\"},{\"attributes\":{\"line_dash\":{\"value\":[2,2]}},\"id\":\"1013\",\"type\":\"MultiLine\"},{\"attributes\":{\"source\":{\"id\":\"1010\"}},\"id\":\"1012\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1014\"},\"glyph\":{\"id\":\"1013\"},\"group\":null,\"hover_glyph\":null,\"view\":{\"id\":\"1016\"}},\"id\":\"1015\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1027\",\"type\":\"LinearScale\"},{\"attributes\":{\"data\":{\"end\":[1,19,5,2,16,3,11,4,14,5,9,6,7,15,8,18,9,13,10,11,19,12,13,17,14,15,16,17,18,19],\"start\":[0,0,0,1,1,2,2,3,3,4,4,5,6,6,7,7,8,8,9,10,10,11,12,12,13,14,15,16,17,18]},\"selected\":{\"id\":\"1043\"},\"selection_policy\":{\"id\":\"1042\"}},\"id\":\"1014\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"group\":null},\"id\":\"1028\",\"type\":\"Title\"},{\"attributes\":{\"source\":{\"id\":\"1014\"}},\"id\":\"1016\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1038\",\"type\":\"NodesOnly\"},{\"attributes\":{},\"id\":\"1040\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"edge_renderer\":{\"id\":\"1015\"},\"group\":null,\"inspection_policy\":{\"id\":\"1039\"},\"layout_provider\":{\"id\":\"1017\"},\"node_renderer\":{\"id\":\"1011\"},\"selection_policy\":{\"id\":\"1038\"}},\"id\":\"1008\",\"type\":\"GraphRenderer\"},{\"attributes\":{},\"id\":\"1039\",\"type\":\"NodesOnly\"},{\"attributes\":{},\"id\":\"1041\",\"type\":\"Selection\"},{\"attributes\":{\"graph_layout\":{\"0\":[-0.3090116186778814,1.4713276589491144],\"1\":[0.6291973604160728,1.8],\"10\":[0.7708078503165311,-0.5835726793043652],\"11\":[1.6867543071999287,-0.1254485913884074],\"12\":[1.380159483630592,-0.972980874858384],\"13\":[0.30211039864483213,-1.4856639537798053],\"14\":[-0.3747847694481658,-0.4162937373558434],\"15\":[-0.776480149958823,0.5802535889665548],\"16\":[0.36577143482781527,1.0769643185669198],\"17\":[0.9879848351156106,0.0132690051189329],\"18\":[0.07507670806425779,-0.4261783203060482],\"19\":[0.3833259869425722,0.412529539936996],\"2\":[1.1357326611886978,0.9313449891734061],\"3\":[-0.07326463681602478,0.43344415338812414],\"4\":[-0.9850447141873108,-0.017278353469085978],\"5\":[-1.3799302680881043,0.9623740755798653],\"6\":[-1.6859857822319355,0.13168238541790797],\"7\":[-1.141700518042085,-0.9099240969417551],\"8\":[-0.6373685741506644,-1.7978587190130495],\"9\":[-0.35334999474591217,-1.0779903886810802]}},\"id\":\"1017\",\"type\":\"StaticLayoutProvider\"}],\"root_ids\":[\"1005\"]},\"title\":\"Bokeh Application\",\"version\":\"2.4.3\"}};\n",
377
+ " const render_items = [{\"docid\":\"99e54df0-baf2-4a27-b383-844ea53d50ee\",\"root_ids\":[\"1005\"],\"roots\":{\"1005\":\"e9510b35-b0ed-4285-9c8b-78fb2a3833c1\"}}];\n",
378
+ " root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
379
+ " }\n",
380
+ " if (root.Bokeh !== undefined) {\n",
381
+ " embed_document(root);\n",
382
+ " } else {\n",
383
+ " let attempts = 0;\n",
384
+ " const timer = setInterval(function(root) {\n",
385
+ " if (root.Bokeh !== undefined) {\n",
386
+ " clearInterval(timer);\n",
387
+ " embed_document(root);\n",
388
+ " } else {\n",
389
+ " attempts++;\n",
390
+ " if (attempts > 100) {\n",
391
+ " clearInterval(timer);\n",
392
+ " console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
393
+ " }\n",
394
+ " }\n",
395
+ " }, 10, root)\n",
396
+ " }\n",
397
+ "})(window);"
398
+ ],
399
+ "application/vnd.bokehjs_exec.v0+json": ""
400
+ },
401
+ "metadata": {
402
+ "application/vnd.bokehjs_exec.v0+json": {
403
+ "id": "1005"
404
+ }
405
+ },
406
+ "output_type": "display_data"
407
+ }
408
+ ],
409
+ "source": [
410
+ "import networkx as nx\n",
411
+ "from bokeh.models import Range1d, Plot\n",
412
+ "from bokeh.plotting import from_networkx\n",
413
+ "\n",
414
+ "G = nx.desargues_graph()\n",
415
+ "\n",
416
+ "# We could use figure here but don't want all the axes and titles\n",
417
+ "plot = Plot(x_range=Range1d(-2, 2), y_range=Range1d(-2, 2))\n",
418
+ "\n",
419
+ "# Create a Bokeh graph from the NetworkX input using nx.spring_layout\n",
420
+ "graph = from_networkx(G, nx.spring_layout, scale=1.8, center=(0,0))\n",
421
+ "plot.renderers.append(graph)\n",
422
+ "\n",
423
+ "# Set some of the default node glyph (Circle) properties\n",
424
+ "graph.node_renderer.glyph.update(size=20, fill_color=\"orange\")\n",
425
+ "\n",
426
+ "# Set some edge properties too\n",
427
+ "graph.edge_renderer.glyph.line_dash = [2,2]\n",
428
+ "\n",
429
+ "show(plot)"
430
+ ]
431
+ },
432
+ {
433
+ "cell_type": "code",
434
+ "execution_count": 3,
435
+ "metadata": {},
436
+ "outputs": [],
437
+ "source": [
438
+ "# Exercise: try a different NetworkX layout, and set some properies on `graph.edge_renderer.glyph` \n",
439
+ "# and `graph.node_renderer.glyph`\n"
440
+ ]
441
+ },
442
+ {
443
+ "cell_type": "markdown",
444
+ "metadata": {},
445
+ "source": [
446
+ "## Adding Extra Data Columns.\n",
447
+ "\n",
448
+ "The `node_renderer` and `edge_renderer` properties of the graph renderer each have a `data_source` that is a standard `ColumnDataSource` that you can add new data to, e.g. to drive a hover tool, or to specify colors for the renderer. The example below demonstates both."
449
+ ]
450
+ },
451
+ {
452
+ "cell_type": "code",
453
+ "execution_count": 4,
454
+ "metadata": {},
455
+ "outputs": [
456
+ {
457
+ "data": {
458
+ "text/html": [
459
+ "\n",
460
+ " <div class=\"bk-root\" id=\"ac0c908b-ed73-4616-9157-81506e350d0d\" data-root-id=\"1156\"></div>\n"
461
+ ]
462
+ },
463
+ "metadata": {},
464
+ "output_type": "display_data"
465
+ },
466
+ {
467
+ "data": {
468
+ "application/javascript": [
469
+ "(function(root) {\n",
470
+ " function embed_document(root) {\n",
471
+ " const docs_json = {\"943b21a8-179c-4680-96cc-2c3d84c446f2\":{\"defs\":[],\"roots\":{\"references\":[{\"attributes\":{\"renderers\":[{\"id\":\"1159\"}],\"title\":{\"id\":\"1203\"},\"toolbar\":{\"id\":\"1182\"},\"x_range\":{\"id\":\"1154\"},\"x_scale\":{\"id\":\"1201\"},\"y_range\":{\"id\":\"1155\"},\"y_scale\":{\"id\":\"1202\"}},\"id\":\"1156\",\"type\":\"Plot\"},{\"attributes\":{\"coordinates\":null,\"group\":null},\"id\":\"1203\",\"type\":\"Title\"},{\"attributes\":{\"callback\":null,\"tooltips\":\"index: @index\"},\"id\":\"1181\",\"type\":\"HoverTool\"},{\"attributes\":{},\"id\":\"1214\",\"type\":\"NodesOnly\"},{\"attributes\":{\"coordinates\":null,\"edge_renderer\":{\"id\":\"1166\"},\"group\":null,\"inspection_policy\":{\"id\":\"1214\"},\"layout_provider\":{\"id\":\"1168\"},\"node_renderer\":{\"id\":\"1162\"},\"selection_policy\":{\"id\":\"1213\"}},\"id\":\"1159\",\"type\":\"GraphRenderer\"},{\"attributes\":{},\"id\":\"1216\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1213\",\"type\":\"NodesOnly\"},{\"attributes\":{\"source\":{\"id\":\"1165\"}},\"id\":\"1167\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1215\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1201\",\"type\":\"LinearScale\"},{\"attributes\":{\"fill_color\":{\"field\":\"colors\"},\"size\":{\"value\":20}},\"id\":\"1160\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"1218\",\"type\":\"Selection\"},{\"attributes\":{\"data\":{\"colors\":[\"#1f77b4\",\"#aec7e8\",\"#ff7f0e\",\"#ffbb78\",\"#2ca02c\",\"#98df8a\",\"#d62728\",\"#ff9896\",\"#9467bd\",\"#c5b0d5\",\"#8c564b\",\"#c49c94\",\"#e377c2\",\"#f7b6d2\",\"#7f7f7f\",\"#c7c7c7\",\"#bcbd22\",\"#dbdb8d\",\"#17becf\",\"#9edae5\"],\"index\":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]},\"selected\":{\"id\":\"1216\"},\"selection_policy\":{\"id\":\"1215\"}},\"id\":\"1161\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"graph_layout\":{\"0\":[1.2513353248855137,-0.8578980661161456],\"1\":[1.4033668593097461,0.0050420003691263],\"10\":[-0.7715444952232617,-0.3474002864966111],\"11\":[-0.6381268758747044,0.5914453204459119],\"12\":[-0.6112044427531907,1.5868814897729537],\"13\":[-1.2521175220081486,0.846401969457995],\"14\":[-0.44135254296849663,0.012612226573467101],\"15\":[0.7686911389062928,0.3513358818821906],\"16\":[1.325462553240648,1.0744761767744528],\"17\":[0.49988136768121183,1.7965876775720755],\"18\":[0.38880689273101354,1.0462638218726472],\"19\":[0.4561803788592891,-0.02350269204231413],\"2\":[0.17396393763157358,-0.3095422868047834],\"3\":[-0.3827993342646065,-1.0492189362435556],\"4\":[-0.5127751155383679,-1.8],\"5\":[0.6002445036483184,-1.5932465809898373],\"6\":[0.6346392825020158,-0.5954571897100698],\"7\":[-0.17339797046855515,0.31644050520529754],\"8\":[-1.3923756911110223,0.005300025570018121],\"9\":[-1.3268782491852684,-1.056521057092818]}},\"id\":\"1168\",\"type\":\"StaticLayoutProvider\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1161\"},\"glyph\":{\"id\":\"1160\"},\"group\":null,\"hover_glyph\":null,\"view\":{\"id\":\"1163\"}},\"id\":\"1162\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1165\"},\"glyph\":{\"id\":\"1164\"},\"group\":null,\"hover_glyph\":null,\"view\":{\"id\":\"1167\"}},\"id\":\"1166\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1164\",\"type\":\"MultiLine\"},{\"attributes\":{},\"id\":\"1202\",\"type\":\"LinearScale\"},{\"attributes\":{\"end\":2,\"start\":-2},\"id\":\"1154\",\"type\":\"Range1d\"},{\"attributes\":{\"source\":{\"id\":\"1161\"}},\"id\":\"1163\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1217\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"tools\":[{\"id\":\"1181\"}]},\"id\":\"1182\",\"type\":\"Toolbar\"},{\"attributes\":{\"end\":2,\"start\":-2},\"id\":\"1155\",\"type\":\"Range1d\"},{\"attributes\":{\"data\":{\"end\":[1,19,5,2,16,3,11,4,14,5,9,6,7,15,8,18,9,13,10,11,19,12,13,17,14,15,16,17,18,19],\"start\":[0,0,0,1,1,2,2,3,3,4,4,5,6,6,7,7,8,8,9,10,10,11,12,12,13,14,15,16,17,18]},\"selected\":{\"id\":\"1218\"},\"selection_policy\":{\"id\":\"1217\"}},\"id\":\"1165\",\"type\":\"ColumnDataSource\"}],\"root_ids\":[\"1156\"]},\"title\":\"Bokeh Application\",\"version\":\"2.4.3\"}};\n",
472
+ " const render_items = [{\"docid\":\"943b21a8-179c-4680-96cc-2c3d84c446f2\",\"root_ids\":[\"1156\"],\"roots\":{\"1156\":\"ac0c908b-ed73-4616-9157-81506e350d0d\"}}];\n",
473
+ " root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
474
+ " }\n",
475
+ " if (root.Bokeh !== undefined) {\n",
476
+ " embed_document(root);\n",
477
+ " } else {\n",
478
+ " let attempts = 0;\n",
479
+ " const timer = setInterval(function(root) {\n",
480
+ " if (root.Bokeh !== undefined) {\n",
481
+ " clearInterval(timer);\n",
482
+ " embed_document(root);\n",
483
+ " } else {\n",
484
+ " attempts++;\n",
485
+ " if (attempts > 100) {\n",
486
+ " clearInterval(timer);\n",
487
+ " console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
488
+ " }\n",
489
+ " }\n",
490
+ " }, 10, root)\n",
491
+ " }\n",
492
+ "})(window);"
493
+ ],
494
+ "application/vnd.bokehjs_exec.v0+json": ""
495
+ },
496
+ "metadata": {
497
+ "application/vnd.bokehjs_exec.v0+json": {
498
+ "id": "1156"
499
+ }
500
+ },
501
+ "output_type": "display_data"
502
+ }
503
+ ],
504
+ "source": [
505
+ "from bokeh.models import HoverTool\n",
506
+ "from bokeh.palettes import Category20_20\n",
507
+ "\n",
508
+ "G = nx.desargues_graph() # always 20 nodes\n",
509
+ "\n",
510
+ "# We could use figure here but don't want all the axes and titles\n",
511
+ "plot = Plot(x_range=Range1d(-2, 2), y_range=Range1d(-2, 2))\n",
512
+ "\n",
513
+ "# Create a Bokeh graph from the NetworkX input using nx.spring_layout\n",
514
+ "graph = from_networkx(G, nx.spring_layout, scale=1.8, center=(0,0))\n",
515
+ "plot.renderers.append(graph)\n",
516
+ "\n",
517
+ "# Add some new columns to the node renderer data source\n",
518
+ "graph.node_renderer.data_source.data['index'] = list(range(len(G)))\n",
519
+ "graph.node_renderer.data_source.data['colors'] = Category20_20\n",
520
+ "\n",
521
+ "graph.node_renderer.glyph.update(size=20, fill_color=\"colors\")\n",
522
+ "\n",
523
+ "plot.add_tools(HoverTool(tooltips=\"index: @index\"))\n",
524
+ "\n",
525
+ "show(plot)"
526
+ ]
527
+ },
528
+ {
529
+ "cell_type": "code",
530
+ "execution_count": 5,
531
+ "metadata": {},
532
+ "outputs": [],
533
+ "source": [
534
+ "# Exercise: Add your own columns for other node or edge properties e.g. fill_alpha or line_color,\n",
535
+ "# or to show other fields in a tooltoip\n"
536
+ ]
537
+ },
538
+ {
539
+ "cell_type": "markdown",
540
+ "metadata": {},
541
+ "source": [
542
+ "## Inspection and Selection Policies\n",
543
+ "\n",
544
+ "Bokeh graph renderers have `inspection_policy` and `selection_policy` properties. These can be used to control how hover inspections highlight the graph, or how selection tools make selections. These properties may be set to any of the inpection policies in `bokeh.graphs`. For instance, if a user hovers over a node, you may wish to highlight all the associated edges as well. This can be accomplished by setting the inspection policy:\n",
545
+ "\n",
546
+ " graph.inspection_policy = NodesAndLinkedEdges()\n",
547
+ " \n",
548
+ "as the example below demonstrates."
549
+ ]
550
+ },
551
+ {
552
+ "cell_type": "code",
553
+ "execution_count": 6,
554
+ "metadata": {},
555
+ "outputs": [
556
+ {
557
+ "data": {
558
+ "text/html": [
559
+ "\n",
560
+ " <div class=\"bk-root\" id=\"8adf30fb-428e-4888-bcdc-aa379e0647b7\" data-root-id=\"1331\"></div>\n"
561
+ ]
562
+ },
563
+ "metadata": {},
564
+ "output_type": "display_data"
565
+ },
566
+ {
567
+ "data": {
568
+ "application/javascript": [
569
+ "(function(root) {\n",
570
+ " function embed_document(root) {\n",
571
+ " const docs_json = {\"8c271dea-e5bc-49c3-bb1c-d2242d76eb1a\":{\"defs\":[],\"roots\":{\"references\":[{\"attributes\":{\"renderers\":[{\"id\":\"1334\"}],\"title\":{\"id\":\"1406\"},\"toolbar\":{\"id\":\"1367\"},\"x_range\":{\"id\":\"1329\"},\"x_scale\":{\"id\":\"1404\"},\"y_range\":{\"id\":\"1330\"},\"y_scale\":{\"id\":\"1405\"}},\"id\":\"1331\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"1364\",\"type\":\"NodesAndLinkedEdges\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1336\"},\"glyph\":{\"id\":\"1344\"},\"group\":null,\"hover_glyph\":{\"id\":\"1354\"},\"view\":{\"id\":\"1338\"}},\"id\":\"1337\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"1336\"}},\"id\":\"1338\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1340\"},\"glyph\":{\"id\":\"1349\"},\"group\":null,\"hover_glyph\":{\"id\":\"1359\"},\"view\":{\"id\":\"1342\"}},\"id\":\"1341\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"callback\":null,\"tooltips\":null},\"id\":\"1366\",\"type\":\"HoverTool\"},{\"attributes\":{\"data\":{\"end\":[8,12,4,14,5,11,4,12,7,10,5,9,12,14,8,7,12,7,11,9,14,12,13,14,13,9,12,13,14,13],\"start\":[0,0,0,1,1,1,2,2,2,2,3,3,3,3,4,4,4,5,5,5,5,5,5,6,6,6,8,9,11,12]},\"selected\":{\"id\":\"1420\"},\"selection_policy\":{\"id\":\"1419\"}},\"id\":\"1340\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"group\":null},\"id\":\"1406\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"1417\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"end\":2,\"start\":-2},\"id\":\"1329\",\"type\":\"Range1d\"},{\"attributes\":{},\"id\":\"1418\",\"type\":\"Selection\"},{\"attributes\":{\"source\":{\"id\":\"1340\"}},\"id\":\"1342\",\"type\":\"CDSView\"},{\"attributes\":{\"fill_color\":{\"value\":\"#2b83ba\"},\"size\":{\"value\":25}},\"id\":\"1344\",\"type\":\"Circle\"},{\"attributes\":{\"end\":2,\"start\":-2},\"id\":\"1330\",\"type\":\"Range1d\"},{\"attributes\":{},\"id\":\"1416\",\"type\":\"NodesOnly\"},{\"attributes\":{\"graph_layout\":{\"0\":[0.645278046770629,-0.9987018745512679],\"1\":[-0.43306831467219686,1.375608772443648],\"10\":[-1.0754020460346072,-1.8],\"11\":[-0.6503728828125933,1.0858467809797117],\"12\":[0.18615021976550677,-0.41067307064769204],\"13\":[0.6096887503315052,0.4156518321817905],\"14\":[-0.005025071494031821,1.1279336754141127],\"2\":[-0.5366648241638303,-1.1022790128622206],\"3\":[0.20479114113645963,0.41292278111078334],\"4\":[-0.010685024859775906,-0.988957603232082],\"5\":[-0.13759197127692246,0.5085301016369252],\"6\":[0.7362617402670019,1.219844596662726],\"7\":[-0.47644367085381184,-0.42959590762611033],\"8\":[0.4046382876031435,-1.257313523116349],\"9\":[0.538445620293525,0.8411824516060239]}},\"id\":\"1343\",\"type\":\"StaticLayoutProvider\"},{\"attributes\":{\"line_alpha\":{\"value\":0.8},\"line_color\":{\"value\":\"#cccccc\"},\"line_width\":{\"value\":2}},\"id\":\"1349\",\"type\":\"MultiLine\"},{\"attributes\":{},\"id\":\"1420\",\"type\":\"Selection\"},{\"attributes\":{\"coordinates\":null,\"edge_renderer\":{\"id\":\"1341\"},\"group\":null,\"inspection_policy\":{\"id\":\"1364\"},\"layout_provider\":{\"id\":\"1343\"},\"node_renderer\":{\"id\":\"1337\"},\"selection_policy\":{\"id\":\"1416\"}},\"id\":\"1334\",\"type\":\"GraphRenderer\"},{\"attributes\":{\"data\":{\"index\":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]},\"selected\":{\"id\":\"1418\"},\"selection_policy\":{\"id\":\"1417\"}},\"id\":\"1336\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1419\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"tools\":[{\"id\":\"1366\"}]},\"id\":\"1367\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"1405\",\"type\":\"LinearScale\"},{\"attributes\":{\"fill_color\":{\"value\":\"#abdda4\"},\"size\":{\"value\":25}},\"id\":\"1354\",\"type\":\"Circle\"},{\"attributes\":{\"line_color\":{\"value\":\"#abdda4\"},\"line_width\":{\"value\":4}},\"id\":\"1359\",\"type\":\"MultiLine\"},{\"attributes\":{},\"id\":\"1404\",\"type\":\"LinearScale\"}],\"root_ids\":[\"1331\"]},\"title\":\"Bokeh Application\",\"version\":\"2.4.3\"}};\n",
572
+ " const render_items = [{\"docid\":\"8c271dea-e5bc-49c3-bb1c-d2242d76eb1a\",\"root_ids\":[\"1331\"],\"roots\":{\"1331\":\"8adf30fb-428e-4888-bcdc-aa379e0647b7\"}}];\n",
573
+ " root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
574
+ " }\n",
575
+ " if (root.Bokeh !== undefined) {\n",
576
+ " embed_document(root);\n",
577
+ " } else {\n",
578
+ " let attempts = 0;\n",
579
+ " const timer = setInterval(function(root) {\n",
580
+ " if (root.Bokeh !== undefined) {\n",
581
+ " clearInterval(timer);\n",
582
+ " embed_document(root);\n",
583
+ " } else {\n",
584
+ " attempts++;\n",
585
+ " if (attempts > 100) {\n",
586
+ " clearInterval(timer);\n",
587
+ " console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
588
+ " }\n",
589
+ " }\n",
590
+ " }, 10, root)\n",
591
+ " }\n",
592
+ "})(window);"
593
+ ],
594
+ "application/vnd.bokehjs_exec.v0+json": ""
595
+ },
596
+ "metadata": {
597
+ "application/vnd.bokehjs_exec.v0+json": {
598
+ "id": "1331"
599
+ }
600
+ },
601
+ "output_type": "display_data"
602
+ }
603
+ ],
604
+ "source": [
605
+ "from bokeh.models.graphs import NodesAndLinkedEdges\n",
606
+ "from bokeh.models import Circle, HoverTool, MultiLine\n",
607
+ "\n",
608
+ "G = nx.gnm_random_graph(15, 30)\n",
609
+ "\n",
610
+ "# We could use figure here but don't want all the axes and titles\n",
611
+ "plot = Plot(x_range=Range1d(-2, 2), y_range=Range1d(-2 ,2))\n",
612
+ "\n",
613
+ "# Create a Bokeh graph from the NetworkX input using nx.spring_layout\n",
614
+ "graph = from_networkx(G, nx.spring_layout, scale=1.8, center=(0,0))\n",
615
+ "plot.renderers.append(graph)\n",
616
+ "\n",
617
+ "# Blue circles for nodes, and light grey lines for edges\n",
618
+ "graph.node_renderer.glyph = Circle(size=25, fill_color='#2b83ba')\n",
619
+ "graph.edge_renderer.glyph = MultiLine(line_color=\"#cccccc\", line_alpha=0.8, line_width=2)\n",
620
+ "\n",
621
+ "# green hover for both nodes and edges\n",
622
+ "graph.node_renderer.hover_glyph = Circle(size=25, fill_color='#abdda4')\n",
623
+ "graph.edge_renderer.hover_glyph = MultiLine(line_color='#abdda4', line_width=4)\n",
624
+ "\n",
625
+ "# When we hover over nodes, highlight adjecent edges too\n",
626
+ "graph.inspection_policy = NodesAndLinkedEdges()\n",
627
+ "\n",
628
+ "plot.add_tools(HoverTool(tooltips=None))\n",
629
+ "\n",
630
+ "show(plot)"
631
+ ]
632
+ },
633
+ {
634
+ "cell_type": "code",
635
+ "execution_count": 7,
636
+ "metadata": {},
637
+ "outputs": [],
638
+ "source": [
639
+ "# Exercise: try a different inspection (or selection) policy like NodesOnly or EdgesAndLinkedNodes\n"
640
+ ]
641
+ },
642
+ {
643
+ "cell_type": "markdown",
644
+ "metadata": {},
645
+ "source": [
646
+ "# Next Section"
647
+ ]
648
+ },
649
+ {
650
+ "cell_type": "markdown",
651
+ "metadata": {},
652
+ "source": [
653
+ "Click on this link to go to the next notebook: [09 - Geographic Plots](09%20-%20Geographic%20Plots.ipynb).\n",
654
+ "\n",
655
+ "To go back to the overview, click [here](00%20-%20Introduction%20and%20Setup.ipynb)."
656
+ ]
657
+ }
658
+ ],
659
+ "metadata": {
660
+ "kernelspec": {
661
+ "display_name": "Python 3",
662
+ "language": "python",
663
+ "name": "python3"
664
+ },
665
+ "language_info": {
666
+ "codemirror_mode": {
667
+ "name": "ipython",
668
+ "version": 3
669
+ },
670
+ "file_extension": ".py",
671
+ "mimetype": "text/x-python",
672
+ "name": "python",
673
+ "nbconvert_exporter": "python",
674
+ "pygments_lexer": "ipython3",
675
+ "version": "3.7.9"
676
+ }
677
+ },
678
+ "nbformat": 4,
679
+ "nbformat_minor": 4
680
+ }