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.
- checksums.yaml +4 -4
- data/assets/data/banner.html +24 -1
- data/assets/themes/j1/adapter/js/masterslider.js +22 -5
- data/assets/themes/j1/core/css/themes/unolight/bootstrap.css +56 -0
- data/assets/themes/j1/core/css/themes/unolight/bootstrap.min.css +1 -1
- data/lib/j1/version.rb +1 -1
- data/lib/starter_web/Gemfile +270 -270
- data/lib/starter_web/_config.yml +19 -9
- data/lib/starter_web/_data/blocks/banner.yml +17 -0
- data/lib/starter_web/_data/modules/defaults/masterslider.yml +1 -1
- data/lib/starter_web/_data/modules/justifiedGallery.yml +82 -0
- data/lib/starter_web/_data/modules/masterslider.yml +5 -9
- data/lib/starter_web/_data/modules/navigator_menu.yml +208 -168
- data/lib/starter_web/_includes/attributes.asciidoc +18 -14
- data/lib/starter_web/_includes/tables/template_variables.asciidoc +1 -1
- data/lib/starter_web/_plugins/asciidoctor-extensions/lightbox-block.rb +4 -4
- data/lib/starter_web/assets/images/pages/features/blog-post-navigator-1280x1000.jpg +0 -0
- data/lib/starter_web/assets/images/pages/features/bootswatch-themes-1280x800.png +0 -0
- data/lib/starter_web/assets/images/pages/features/clipboard-1280x600.jpg +0 -0
- data/lib/starter_web/assets/images/pages/features/comments-1280x600.jpg +0 -0
- data/lib/starter_web/assets/images/pages/features/cookie-consent-1280x800.jpg +0 -0
- data/lib/starter_web/assets/images/pages/features/desktop-web-navigation-1280x1000.jpg +0 -0
- data/lib/starter_web/assets/images/pages/features/example-content-1280x800.jpg +0 -0
- data/lib/starter_web/assets/images/pages/features/example-content-present-videos-1280x800.jpg +0 -0
- data/lib/starter_web/assets/images/pages/features/fab-1280x500.jpg +0 -0
- data/lib/starter_web/assets/images/pages/features/full-text-search-1280x800.jpg +0 -0
- data/lib/starter_web/assets/images/pages/features/global-mobile-traffic-1920x1080.png +0 -0
- data/lib/starter_web/assets/images/pages/features/google-lighthouse-1080x300.png +0 -0
- data/lib/starter_web/assets/images/pages/features/intro-panel-1280x800.jpg +0 -0
- data/lib/starter_web/assets/images/pages/features/master-header-1280x600.jpg +0 -0
- data/lib/starter_web/assets/images/pages/features/mobile-navigation-600x800.png +0 -0
- data/lib/starter_web/assets/images/pages/features/native-speakers-by-language.png +0 -0
- data/lib/starter_web/assets/images/pages/features/nav-module-1280x300.jpg +0 -0
- data/lib/starter_web/assets/images/pages/features/nbi-barchart-1280x800.jpg +0 -0
- data/lib/starter_web/assets/images/pages/features/teaser-banner-1280x600.jpg +0 -0
- data/lib/starter_web/assets/images/pages/features/translator-1280x800.jpg +0 -0
- data/lib/starter_web/assets/images/sticker/600x600/sticker-new-version.png +0 -0
- data/lib/starter_web/assets/images/sticker/scalable/readme +0 -0
- data/lib/starter_web/package.json +6 -6
- data/lib/starter_web/pages/public/_jupyter/docs/_includes/attributes.asciidoc +67 -0
- data/lib/starter_web/pages/public/_jupyter/docs/_includes/documents/j1_docs_example_static.asciidoc +232 -0
- data/lib/starter_web/pages/public/_jupyter/docs/binderhub.adoc +631 -0
- data/lib/starter_web/pages/public/_jupyter/docs/j1-nbinteract.adoc +638 -0
- data/lib/starter_web/pages/public/_jupyter/docs/jupyterhub.adoc +248 -0
- data/lib/starter_web/pages/public/_jupyter/docs/nbinteract-widget-manual.adoc +928 -0
- data/lib/starter_web/pages/public/_jupyter/examples/distributed/j1-circular-times-table.adoc +139 -0
- data/lib/starter_web/pages/public/_jupyter/examples/distributed/j1-common-used-widgets.adoc +229 -0
- data/lib/starter_web/pages/public/_jupyter/examples/distributed/j1-odes-in-python.adoc +112 -0
- data/lib/starter_web/pages/public/_jupyter/examples/localized/j1-altair/j1-altair-visualisations.adoc +142 -0
- data/lib/starter_web/pages/public/_jupyter/examples/localized/j1-bokeh/j1-bokeh-visualisations.adoc +171 -0
- data/lib/starter_web/pages/public/_jupyter/examples/localized/j1-bokeh/j1-bqplot-eamples.adoc +111 -0
- data/lib/starter_web/pages/public/_jupyter/examples/localized/j1-plotly/j1-plotly-visualisations.adoc +94 -0
- data/lib/starter_web/pages/public/_jupyter/examples/localized/j1_climate-change-forecast.adoc +106 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_altair_interactive-checkpoint.ipynb +16260 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_bgplot_line_plot-checkpoint.ipynb +247 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_circular_times_table-Copy1-checkpoint.ipynb +12382 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_circular_times_table-checkpoint.ipynb +12387 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_circular_times_table-short-checkpoint.ipynb +12170 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_climate_change_forecast-checkpoint.ipynb +1058 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_docs_example_dynamic-checkpoint.ipynb +14478 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_interactive_widgets-Copy1-checkpoint.ipynb +379 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_interactive_widgets-checkpoint.ipynb +442 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets-checkpoint.ipynb +523 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets.line_charts-checkpoint.ipynb +84 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets.questions-checkpoint.ipynb +194 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets_bar_chart-checkpoint.ipynb +89 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets_bar_charts-Copy1-checkpoint.ipynb +164 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets_bar_charts-checkpoint.ipynb +173 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets_bar_charts.1-checkpoint.ipynb +256 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets_barcharts-checkpoint.ipynb +126 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets_hist_chart-checkpoint.ipynb +87 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets_line_chart-checkpoint.ipynb +90 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets_line_charts-checkpoint.ipynb +87 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets_question_multiple_choice-checkpoint.ipynb +64 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets_question_short_answer-checkpoint.ipynb +122 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets_questions-checkpoint.ipynb +181 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets_scatter_chart-checkpoint.ipynb +89 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets_scatter_charts-checkpoint.ipynb +175 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_nbi_widgets_scatter_drag_chart-checkpoint.ipynb +87 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_ode_selected-checkpoint.ipynb +14478 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1/.ipynb_checkpoints/j1_odes_in_python-checkpoint.ipynb +15227 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1/factor_by_factor.mp4 +0 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1/j1_circular_times_table.ipynb +12382 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1/j1_climate_change_forecast.ipynb +1058 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1/j1_docs_example_dynamic.ipynb +14478 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1/j1_interactive_widgets.ipynb +442 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1/j1_nbi_widgets.ipynb +523 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1/j1_nbi_widgets_bar_chart.ipynb +89 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1/j1_nbi_widgets_hist_chart.ipynb +87 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1/j1_nbi_widgets_line_chart.ipynb +90 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1/j1_nbi_widgets_question_multiple_choice.ipynb +64 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1/j1_nbi_widgets_question_short_answer.ipynb +122 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1/j1_nbi_widgets_scatter_chart.ipynb +89 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1/j1_nbi_widgets_scatter_drag_chart.ipynb +87 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1/j1_odes_in_python.ipynb +15227 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1/line_by_line.mp4 +0 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1/point_by_point.mp4 +0 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1-altair-tutorial/.ipynb_checkpoints/j1_altair_interactive-checkpoint.ipynb +16296 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1-altair-tutorial/.ipynb_checkpoints/j1_altair_non_interactive-checkpoint.ipynb +15385 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1-altair-tutorial/j1_altair_interactive.ipynb +16296 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1-altair-tutorial/j1_altair_non_interactive.ipynb +15385 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/00 - Introduction and Setup-checkpoint.ipynb +717 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/01 - Basic Plotting-checkpoint.ipynb +1381 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/02 - Styling and Theming-checkpoint.ipynb +1440 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/03 - Data Sources and Transformations-checkpoint.ipynb +927 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/04 - Adding Annotations-checkpoint.ipynb +1105 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/05 - Presentation Layouts-checkpoint.ipynb +578 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/06 - Linking and Interactions-checkpoint.ipynb +1196 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/07 - Bar and Categorical Data Plots-checkpoint.ipynb +1681 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/08 - Graph and Network Plots-checkpoint.ipynb +680 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/09 - Geographic Plots-checkpoint.ipynb +693 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/10 - Exporting and Embedding-checkpoint.ipynb +751 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/11 - Running Bokeh Applications-checkpoint.ipynb +770 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/bokeh_tut_00_introduction_and_setup-checkpoint.ipynb +666 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/j1_bokeh_01_basic_plotting-checkpoint.ipynb +1365 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/j1_bokeh_02_styling_and_theming-checkpoint.ipynb +1405 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/j1_bokeh_03_data_sources_and_transformations-checkpoint.ipynb +856 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/j1_bokeh_04_adding_annotations-checkpoint.ipynb +1167 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/j1_bokeh_05_presentation_layouts-checkpoint.ipynb +601 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/j1_bokeh_06_linking_and_interactions-checkpoint.ipynb +1356 -0
- 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
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/j1_bokeh_08_graph_and_network_plots-checkpoint.ipynb +625 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/j1_bokeh_09_geographic_plots-checkpoint.ipynb +685 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/j1_bokeh_10_exporting_and_embedding-checkpoint.ipynb +726 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/j1_bokeh_10_exporting_and_embedding-checkpoint.org +726 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/j1_bokeh_10_exporting_and_embedding.new-checkpoint.ipynb +560 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/.ipynb_checkpoints/j1_bokeh_11_running_bokeh_applications-checkpoint.ipynb +716 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/j1_bokeh_01_basic_plotting.ipynb +1365 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/j1_bokeh_02_styling_and_theming.ipynb +1405 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/j1_bokeh_03_data_sources_and_transformations.ipynb +856 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/j1_bokeh_04_adding_annotations.ipynb +1167 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/j1_bokeh_05_presentation_layouts.ipynb +601 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/j1_bokeh_06_linking_and_interactions.ipynb +1356 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/j1_bokeh_07_bar_and_categorical_data_plots.ipynb +1742 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/j1_bokeh_08_graph_and_network_plots.ipynb +625 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bokeh-tutorial/j1_bokeh_09_geographic_plots.ipynb +685 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bqplot/.ipynb_checkpoints/j1_mathplot_vs_bqplot-checkpoint.ipynb +336 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bqplot/advanced/Feature_Vector_Distribution-Iris-Digits.ipynb +433 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bqplot/j1_bgplot_line_plot.ipynb +244 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bqplot/j1_circular_times_table-short.ipynb +12170 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/j1-bqplot/j1_mathplot_vs_bqplot.ipynb +336 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/.ipynb_checkpoints/Index-checkpoint.ipynb +163 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/.ipynb_checkpoints/Tutorials-checkpoint.ipynb +51 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Advanced Plotting/Advanced Plotting.ipynb +289 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Advanced Plotting/Animations.ipynb +266 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Advanced Plotting/Axis Properties.ipynb +396 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Advanced Plotting/Plotting Dates.ipynb +318 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Applications/Equity Index Performance/Time Series.ipynb +158 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Applications/Equity Index Performance/spx_prices.csv +6799 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Applications/Feature_Vector_Distribution-Iris-Digits.ipynb +470 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Applications/Index.ipynb +49 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Applications/Logs Analytics/Logs Dashboard.ipynb +378 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Applications/Mobile Patent Suits.ipynb +123 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Applications/Neural Network.ipynb +177 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Applications/Outlier Detection.ipynb +311 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Applications/Wealth Of Nations/Bubble Chart.ipynb +255 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Applications/Wealth Of Nations/Choropleth.ipynb +275 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Applications/Wealth Of Nations/nations.json +1 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Applications/Wealth Of Nations/world_map_codes.csv +234 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Basic Plotting/.ipynb_checkpoints/Basic Plotting-checkpoint.ipynb +186 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Basic Plotting/.ipynb_checkpoints/Pyplot-checkpoint.ipynb +794 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Basic Plotting/.ipynb_checkpoints/Untitled-checkpoint.ipynb +323 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Basic Plotting/Basic Plotting.ipynb +261 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Basic Plotting/Pyplot.ipynb +1489 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Index.ipynb +163 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Interactions/Interaction Layer.ipynb +966 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Interactions/Mark Interactions.ipynb +476 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Interactions/Selectors.ipynb +427 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Introduction.ipynb +528 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/Bars.ipynb +480 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/Bins.ipynb +217 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/Boxplot.ipynb +253 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/Candles.ipynb +225 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/FlexLine.ipynb +123 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/Graph.ipynb +357 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/GridHeatMap.ipynb +422 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/HeatMap.ipynb +157 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/Hist.ipynb +176 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/Image.ipynb +195 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/Label.ipynb +189 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/Lines.ipynb +565 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/Map.ipynb +182 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/Market Map.ipynb +315 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/Pie.ipynb +465 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Object Model/Scatter.ipynb +835 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Pyplot/Bars.ipynb +362 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Pyplot/Bins.ipynb +252 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Pyplot/Boxplot.ipynb +273 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Pyplot/Candles.ipynb +242 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Pyplot/GridHeatMap.ipynb +417 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Pyplot/HeatMap.ipynb +155 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Pyplot/Hist.ipynb +238 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Pyplot/Image.ipynb +152 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Pyplot/Label.ipynb +206 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Pyplot/Lines.ipynb +474 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Pyplot/Map.ipynb +181 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Pyplot/Pie.ipynb +310 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Marks/Pyplot/Scatter.ipynb +702 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Scales/Color Scales.ipynb +495 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Tutorials/.ipynb_checkpoints/Feature_Vector_Distribution-Iris-Digits-checkpoint.ipynb +433 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Tutorials/.ipynb_checkpoints/Linking Plots With Widgets-checkpoint.ipynb +326 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Tutorials/.ipynb_checkpoints/Updating Plots-Copy1-checkpoint.ipynb +177 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Tutorials/.ipynb_checkpoints/Updating Plots-checkpoint.ipynb +177 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Tutorials/Brush Interval Selector.ipynb +154 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Tutorials/Fast Interval Selector.ipynb +152 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Tutorials/Gaussian Density Widget.ipynb +128 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Tutorials/Gaussian Density.ipynb +113 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Tutorials/Linking Plots With Widgets.ipynb +326 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Tutorials/Object Model.ipynb +179 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Tutorials/Pyplot.ipynb +174 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Tutorials/Updating Plots.ipynb +177 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/Tutorials.ipynb +51 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/data_files/country_codes.csv +213 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/data_files/gdp_per_capita.csv +56 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/data_files/state_codes.csv +52 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/martin_renou_bqplot/data_files/trees.jpg +0 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/.ipynb_checkpoints/nbi_docs_examples_central_limit_theorem-checkpoint.ipynb +247 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/.ipynb_checkpoints/nbi_docs_examples_variability_of_the_sample_mean-checkpoint.ipynb +323 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/.ipynb_checkpoints/nbi_docs_recipes_graphing-checkpoint.ipynb +387 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/.ipynb_checkpoints/nbi_docs_recipes_interactive_questions-checkpoint.ipynb +185 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/.ipynb_checkpoints/nbi_docs_recipes_layout-checkpoint.ipynb +384 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/.ipynb_checkpoints/nbi_docs_tutorial_interact-checkpoint.ipynb +254 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/.ipynb_checkpoints/nbi_docs_tutorial_monty_hall-checkpoint.ipynb +732 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/nbi_docs_examples_central_limit_theorem.ipynb +247 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/nbi_docs_examples_correlation.ipynb +651 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/nbi_docs_examples_empirical_distributions.ipynb +773 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/nbi_docs_examples_linear_regression.ipynb +111 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/nbi_docs_examples_probability_distribution_plots.ipynb +199 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/nbi_docs_examples_sampling_from_a_population.ipynb +421 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/nbi_docs_examples_variability_of_the_sample_mean.ipynb +323 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/nbi_docs_recipes_graphing.ipynb +387 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/nbi_docs_recipes_interactive_questions.ipynb +185 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/nbi_docs_recipes_layout.ipynb +384 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/nbi_docs_tutorial_interact.ipynb +254 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/nbi-docs/nbi_docs_tutorial_monty_hall.ipynb +732 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Advanced Plotting.html +373 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Animations.html +361 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Axis Properties.html +569 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Bars.html +487 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Basic Plotting.html +341 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Bins.html +259 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Boxplot.html +277 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Brush Interval Selector.html +182 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Bubble Chart.html +299 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Candles.html +252 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Choropleth.html +318 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Color Scales.html +514 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Fast Interval Selector.html +182 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Feature_Vector_Distribution-Iris-Digits.html +479 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/FlexLine.html +128 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Gaussian Density Widget.html +152 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Gaussian Density.html +137 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Graph.html +484 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/GridHeatMap.html +483 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/HeatMap.html +170 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Hist.html +349 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Image.html +177 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Index.html +29 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Interaction Layer.html +1372 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Introduction.html +749 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Label.html +268 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Lines.html +704 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Linking Plots With Widgets.html +389 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Logs Dashboard.html +455 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Map.html +229 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Mark Interactions.html +613 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Market Map.html +413 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Mobile Patent Suits.html +131 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Neural Network.html +190 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Object Model.html +193 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Outlier Detection.html +363 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Pie.html +367 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Plotting Dates.html +337 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Pyplot.html +196 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Scatter.html +948 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Selectors.html +489 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Time Series.html +173 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Tutorials.html +40 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/Updating Plots.html +228 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_altair_interactive.html +2216 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_altair_non_interactive.html +1170 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_bgplot_line_plot.html +318 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_bokeh_01_basic_plotting.html +1479 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_bokeh_02_styling_and_theming.html +1524 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_bokeh_03_data_sources_and_transformations.html +983 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_bokeh_04_adding_annotations.html +1280 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_bokeh_05_presentation_layouts.html +660 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_bokeh_06_linking_and_interactions.html +1563 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_bokeh_07_bar_and_categorical_data_plots.html +1888 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_bokeh_08_graph_and_network_plots.html +689 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_bokeh_09_geographic_plots.html +767 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_circular_times_table-short.html +475 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_circular_times_table.html +747 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_climate_change_forecast.html +1250 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_docs_example_dynamic.html +186 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_interactive_widgets.html +512 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_mathplot_vs_bqplot.html +407 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_nbi_widgets.html +629 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_nbi_widgets_bar_chart.html +95 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_nbi_widgets_hist_chart.html +93 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_nbi_widgets_line_chart.html +96 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_nbi_widgets_question_multiple_choice.html +70 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_nbi_widgets_question_short_answer.html +156 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_nbi_widgets_scatter_chart.html +95 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_nbi_widgets_scatter_drag_chart.html +93 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/j1_odes_in_python.html +955 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/nbi_docs_examples_central_limit_theorem.html +290 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/nbi_docs_examples_correlation.html +818 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/nbi_docs_examples_empirical_distributions.html +351 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/nbi_docs_examples_linear_regression.html +106 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/nbi_docs_examples_probability_distribution_plots.html +228 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/nbi_docs_examples_sampling_from_a_population.html +518 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/nbi_docs_examples_variability_of_the_sample_mean.html +372 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/nbi_docs_recipes_graphing.html +473 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/nbi_docs_recipes_interactive_questions.html +242 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/nbi_docs_recipes_layout.html +496 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/nbi_docs_tutorial_interact.html +329 -0
- data/lib/starter_web/pages/public/_jupyter/notebooks/textbooks/nbi_docs_tutorial_monty_hall.html +866 -0
- data/lib/starter_web/pages/public/_jupyter/where_to_go.adoc +270 -0
- data/lib/starter_web/pages/public/features/general.adoc +74 -33
- data/lib/starter_web/pages/public/features/template.adoc +159 -68
- data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_interactive_widgets.html +512 -512
- data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_nbi_widgets.html +629 -629
- data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_nbi_widgets_bar_chart.html +95 -95
- data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_nbi_widgets_hist_chart.html +93 -93
- data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_nbi_widgets_line_chart.html +96 -96
- data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_nbi_widgets_question_multiple_choice.html +70 -70
- data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_nbi_widgets_question_short_answer.html +156 -156
- data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_nbi_widgets_scatter_chart.html +95 -95
- data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_nbi_widgets_scatter_drag_chart.html +93 -93
- data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_odes_in_python.html +955 -955
- data/lib/starter_web/pages/public/learn/_roundtrip/100_present_images.adoc +313 -0
- data/lib/starter_web/pages/public/learn/_roundtrip/100_present_videos.adoc +281 -0
- data/lib/starter_web/pages/public/learn/_roundtrip/200_typography.adoc +253 -0
- data/lib/starter_web/pages/public/learn/_roundtrip/300_icon_fonts.adoc +579 -0
- data/lib/starter_web/pages/public/learn/_roundtrip/400_asciidoc_extensions.adoc +718 -0
- data/lib/starter_web/pages/public/learn/_roundtrip/410_bs_modals_extentions.adoc +91 -0
- data/lib/starter_web/pages/public/learn/_roundtrip/420_responsive_tables_extensions.adoc +420 -0
- data/lib/starter_web/pages/public/learn/_roundtrip/500_themes.adoc +250 -0
- data/lib/starter_web/pages/public/learn/_roundtrip/600_quicksearch.adoc +425 -0
- data/lib/starter_web/pages/public/learn/_roundtrip/_includes/attributes.asciidoc +118 -0
- data/lib/starter_web/pages/public/learn/_roundtrip/_includes/documents/100_gistblock.asciidoc +28 -0
- data/lib/starter_web/pages/public/learn/_roundtrip/_includes/documents/410_bottom_info.asciidoc +14 -0
- data/lib/starter_web/pages/public/learn/_roundtrip/_includes/documents/410_bottom_left_warning.asciidoc +11 -0
- data/lib/starter_web/pages/public/learn/_roundtrip/_includes/documents/410_bottom_right_danger.asciidoc +11 -0
- data/lib/starter_web/pages/public/learn/_roundtrip/_includes/documents/410_central_success.asciidoc +11 -0
- data/lib/starter_web/pages/public/learn/_roundtrip/_includes/documents/410_full_height_left_info.asciidoc +11 -0
- data/lib/starter_web/pages/public/learn/_roundtrip/_includes/documents/410_full_height_right_success.asciidoc +11 -0
- data/lib/starter_web/pages/public/learn/_roundtrip/_includes/documents/410_table_bs_modal_examples.asciidoc +47 -0
- data/lib/starter_web/pages/public/learn/_roundtrip/_includes/documents/410_top_info.asciidoc +11 -0
- data/lib/starter_web/pages/public/learn/_roundtrip/_includes/documents/410_top_left_info.asciidoc +11 -0
- data/lib/starter_web/pages/public/learn/_roundtrip/_includes/documents/410_top_right_success.asciidoc +11 -0
- data/lib/starter_web/pages/public/learn/_roundtrip/_includes/documents/419_advanced_modals_demo.asciidoc +337 -0
- data/lib/starter_web/pages/public/learn/_roundtrip/_includes/documents/tables/bs_modal_examples.asciidoc +47 -0
- data/lib/starter_web/pages/public/learn/_roundtrip/_includes/google-ad.js +130 -0
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.adoc +6 -5
- data/lib/starter_web/pages/public/learn/roundtrip/300_icon_fonts.adoc +1 -2
- data/lib/starter_web/pages/public/learn/roundtrip/400_asciidoc_extensions.adoc +4 -2
- data/lib/starter_web/pages/public/learn/roundtrip/500_themes.adoc +1 -1
- data/lib/starter_web/pages/public/learn/roundtrip/_includes/attributes.asciidoc +1 -1
- data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
- data/lib/starter_web/utilsrv/package.json +1 -1
- metadata +384 -17
- data/lib/starter_web/_includes/_attributes.asciidoc +0 -575
- data/lib/starter_web/assets/images/pages/features/bootswatch-themes-1080x800.jpg +0 -0
- data/lib/starter_web/assets/images/pages/features/comments-1080x600.jpg +0 -0
- data/lib/starter_web/assets/images/pages/features/cookie-consent-1080x800.jpg +0 -0
- data/lib/starter_web/assets/images/pages/features/example-content-present-videos-1080x800.jpg +0 -0
- data/lib/starter_web/assets/images/pages/features/fab-1080x500.jpg +0 -0
- data/lib/starter_web/assets/images/pages/features/full-text-search-1080x800.jpg +0 -0
- data/lib/starter_web/assets/images/pages/features/global-mobile-traffic-1920x1080.jpg +0 -0
- data/lib/starter_web/assets/images/pages/features/google-lighthouse-1080x300.jpg +0 -0
- data/lib/starter_web/assets/images/pages/features/intro-panel-1080x800.jpg +0 -0
- data/lib/starter_web/assets/images/pages/features/mobile-navigation-600x800.jpg +0 -0
- data/lib/starter_web/assets/images/pages/features/native-speakers-by-language.jpg +0 -0
- data/lib/starter_web/assets/images/pages/features/nav-module-1080x300.jpg +0 -0
- data/lib/starter_web/assets/images/pages/features/teaser-banner-1080x600.jpg +0 -0
- data/lib/starter_web/assets/images/pages/features/translator-1080x800.jpg +0 -0
@@ -0,0 +1,625 @@
|
|
1
|
+
{
|
2
|
+
"cells": [
|
3
|
+
{
|
4
|
+
"cell_type": "markdown",
|
5
|
+
"metadata": {},
|
6
|
+
"source": [
|
7
|
+
"## 8. Graph and Network Plots\n",
|
8
|
+
"\n",
|
9
|
+
"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"
|
10
|
+
]
|
11
|
+
},
|
12
|
+
{
|
13
|
+
"cell_type": "code",
|
14
|
+
"execution_count": 1,
|
15
|
+
"metadata": {},
|
16
|
+
"outputs": [],
|
17
|
+
"source": [
|
18
|
+
"from bokeh.io import show, output_notebook\n",
|
19
|
+
"from bokeh.plotting import figure"
|
20
|
+
]
|
21
|
+
},
|
22
|
+
{
|
23
|
+
"cell_type": "code",
|
24
|
+
"execution_count": 2,
|
25
|
+
"metadata": {},
|
26
|
+
"outputs": [
|
27
|
+
{
|
28
|
+
"data": {
|
29
|
+
"text/html": [
|
30
|
+
"<div class=\"bk-root\">\n",
|
31
|
+
" <a href=\"https://bokeh.org\" target=\"_blank\" class=\"bk-logo bk-logo-small bk-logo-notebook\"></a>\n",
|
32
|
+
" <span id=\"1002\">Loading BokehJS ...</span>\n",
|
33
|
+
" </div>\n"
|
34
|
+
]
|
35
|
+
},
|
36
|
+
"metadata": {},
|
37
|
+
"output_type": "display_data"
|
38
|
+
},
|
39
|
+
{
|
40
|
+
"data": {
|
41
|
+
"application/javascript": [
|
42
|
+
"(function(root) {\n",
|
43
|
+
" function now() {\n",
|
44
|
+
" return new Date();\n",
|
45
|
+
" }\n",
|
46
|
+
"\n",
|
47
|
+
" const force = true;\n",
|
48
|
+
"\n",
|
49
|
+
" if (typeof root._bokeh_onload_callbacks === \"undefined\" || force === true) {\n",
|
50
|
+
" root._bokeh_onload_callbacks = [];\n",
|
51
|
+
" root._bokeh_is_loading = undefined;\n",
|
52
|
+
" }\n",
|
53
|
+
"\n",
|
54
|
+
"const JS_MIME_TYPE = 'application/javascript';\n",
|
55
|
+
" const HTML_MIME_TYPE = 'text/html';\n",
|
56
|
+
" const EXEC_MIME_TYPE = 'application/vnd.bokehjs_exec.v0+json';\n",
|
57
|
+
" const CLASS_NAME = 'output_bokeh rendered_html';\n",
|
58
|
+
"\n",
|
59
|
+
" /**\n",
|
60
|
+
" * Render data to the DOM node\n",
|
61
|
+
" */\n",
|
62
|
+
" function render(props, node) {\n",
|
63
|
+
" const script = document.createElement(\"script\");\n",
|
64
|
+
" node.appendChild(script);\n",
|
65
|
+
" }\n",
|
66
|
+
"\n",
|
67
|
+
" /**\n",
|
68
|
+
" * Handle when an output is cleared or removed\n",
|
69
|
+
" */\n",
|
70
|
+
" function handleClearOutput(event, handle) {\n",
|
71
|
+
" const cell = handle.cell;\n",
|
72
|
+
"\n",
|
73
|
+
" const id = cell.output_area._bokeh_element_id;\n",
|
74
|
+
" const server_id = cell.output_area._bokeh_server_id;\n",
|
75
|
+
" // Clean up Bokeh references\n",
|
76
|
+
" if (id != null && id in Bokeh.index) {\n",
|
77
|
+
" Bokeh.index[id].model.document.clear();\n",
|
78
|
+
" delete Bokeh.index[id];\n",
|
79
|
+
" }\n",
|
80
|
+
"\n",
|
81
|
+
" if (server_id !== undefined) {\n",
|
82
|
+
" // Clean up Bokeh references\n",
|
83
|
+
" const cmd_clean = \"from bokeh.io.state import curstate; print(curstate().uuid_to_server['\" + server_id + \"'].get_sessions()[0].document.roots[0]._id)\";\n",
|
84
|
+
" cell.notebook.kernel.execute(cmd_clean, {\n",
|
85
|
+
" iopub: {\n",
|
86
|
+
" output: function(msg) {\n",
|
87
|
+
" const id = msg.content.text.trim();\n",
|
88
|
+
" if (id in Bokeh.index) {\n",
|
89
|
+
" Bokeh.index[id].model.document.clear();\n",
|
90
|
+
" delete Bokeh.index[id];\n",
|
91
|
+
" }\n",
|
92
|
+
" }\n",
|
93
|
+
" }\n",
|
94
|
+
" });\n",
|
95
|
+
" // Destroy server and session\n",
|
96
|
+
" const cmd_destroy = \"import bokeh.io.notebook as ion; ion.destroy_server('\" + server_id + \"')\";\n",
|
97
|
+
" cell.notebook.kernel.execute(cmd_destroy);\n",
|
98
|
+
" }\n",
|
99
|
+
" }\n",
|
100
|
+
"\n",
|
101
|
+
" /**\n",
|
102
|
+
" * Handle when a new output is added\n",
|
103
|
+
" */\n",
|
104
|
+
" function handleAddOutput(event, handle) {\n",
|
105
|
+
" const output_area = handle.output_area;\n",
|
106
|
+
" const output = handle.output;\n",
|
107
|
+
"\n",
|
108
|
+
" // limit handleAddOutput to display_data with EXEC_MIME_TYPE content only\n",
|
109
|
+
" if ((output.output_type != \"display_data\") || (!Object.prototype.hasOwnProperty.call(output.data, EXEC_MIME_TYPE))) {\n",
|
110
|
+
" return\n",
|
111
|
+
" }\n",
|
112
|
+
"\n",
|
113
|
+
" const toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n",
|
114
|
+
"\n",
|
115
|
+
" if (output.metadata[EXEC_MIME_TYPE][\"id\"] !== undefined) {\n",
|
116
|
+
" toinsert[toinsert.length - 1].firstChild.textContent = output.data[JS_MIME_TYPE];\n",
|
117
|
+
" // store reference to embed id on output_area\n",
|
118
|
+
" output_area._bokeh_element_id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n",
|
119
|
+
" }\n",
|
120
|
+
" if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n",
|
121
|
+
" const bk_div = document.createElement(\"div\");\n",
|
122
|
+
" bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n",
|
123
|
+
" const script_attrs = bk_div.children[0].attributes;\n",
|
124
|
+
" for (let i = 0; i < script_attrs.length; i++) {\n",
|
125
|
+
" toinsert[toinsert.length - 1].firstChild.setAttribute(script_attrs[i].name, script_attrs[i].value);\n",
|
126
|
+
" toinsert[toinsert.length - 1].firstChild.textContent = bk_div.children[0].textContent\n",
|
127
|
+
" }\n",
|
128
|
+
" // store reference to server id on output_area\n",
|
129
|
+
" output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n",
|
130
|
+
" }\n",
|
131
|
+
" }\n",
|
132
|
+
"\n",
|
133
|
+
" function register_renderer(events, OutputArea) {\n",
|
134
|
+
"\n",
|
135
|
+
" function append_mime(data, metadata, element) {\n",
|
136
|
+
" // create a DOM node to render to\n",
|
137
|
+
" const toinsert = this.create_output_subarea(\n",
|
138
|
+
" metadata,\n",
|
139
|
+
" CLASS_NAME,\n",
|
140
|
+
" EXEC_MIME_TYPE\n",
|
141
|
+
" );\n",
|
142
|
+
" this.keyboard_manager.register_events(toinsert);\n",
|
143
|
+
" // Render to node\n",
|
144
|
+
" const props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n",
|
145
|
+
" render(props, toinsert[toinsert.length - 1]);\n",
|
146
|
+
" element.append(toinsert);\n",
|
147
|
+
" return toinsert\n",
|
148
|
+
" }\n",
|
149
|
+
"\n",
|
150
|
+
" /* Handle when an output is cleared or removed */\n",
|
151
|
+
" events.on('clear_output.CodeCell', handleClearOutput);\n",
|
152
|
+
" events.on('delete.Cell', handleClearOutput);\n",
|
153
|
+
"\n",
|
154
|
+
" /* Handle when a new output is added */\n",
|
155
|
+
" events.on('output_added.OutputArea', handleAddOutput);\n",
|
156
|
+
"\n",
|
157
|
+
" /**\n",
|
158
|
+
" * Register the mime type and append_mime function with output_area\n",
|
159
|
+
" */\n",
|
160
|
+
" OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n",
|
161
|
+
" /* Is output safe? */\n",
|
162
|
+
" safe: true,\n",
|
163
|
+
" /* Index of renderer in `output_area.display_order` */\n",
|
164
|
+
" index: 0\n",
|
165
|
+
" });\n",
|
166
|
+
" }\n",
|
167
|
+
"\n",
|
168
|
+
" // register the mime type if in Jupyter Notebook environment and previously unregistered\n",
|
169
|
+
" if (root.Jupyter !== undefined) {\n",
|
170
|
+
" const events = require('base/js/events');\n",
|
171
|
+
" const OutputArea = require('notebook/js/outputarea').OutputArea;\n",
|
172
|
+
"\n",
|
173
|
+
" if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n",
|
174
|
+
" register_renderer(events, OutputArea);\n",
|
175
|
+
" }\n",
|
176
|
+
" }\n",
|
177
|
+
" if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n",
|
178
|
+
" root._bokeh_timeout = Date.now() + 5000;\n",
|
179
|
+
" root._bokeh_failed_load = false;\n",
|
180
|
+
" }\n",
|
181
|
+
"\n",
|
182
|
+
" const NB_LOAD_WARNING = {'data': {'text/html':\n",
|
183
|
+
" \"<div style='background-color: #fdd'>\\n\"+\n",
|
184
|
+
" \"<p>\\n\"+\n",
|
185
|
+
" \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n",
|
186
|
+
" \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n",
|
187
|
+
" \"</p>\\n\"+\n",
|
188
|
+
" \"<ul>\\n\"+\n",
|
189
|
+
" \"<li>re-rerun `output_notebook()` to attempt to load from CDN again, or</li>\\n\"+\n",
|
190
|
+
" \"<li>use INLINE resources instead, as so:</li>\\n\"+\n",
|
191
|
+
" \"</ul>\\n\"+\n",
|
192
|
+
" \"<code>\\n\"+\n",
|
193
|
+
" \"from bokeh.resources import INLINE\\n\"+\n",
|
194
|
+
" \"output_notebook(resources=INLINE)\\n\"+\n",
|
195
|
+
" \"</code>\\n\"+\n",
|
196
|
+
" \"</div>\"}};\n",
|
197
|
+
"\n",
|
198
|
+
" function display_loaded() {\n",
|
199
|
+
" const el = document.getElementById(\"1002\");\n",
|
200
|
+
" if (el != null) {\n",
|
201
|
+
" el.textContent = \"BokehJS is loading...\";\n",
|
202
|
+
" }\n",
|
203
|
+
" if (root.Bokeh !== undefined) {\n",
|
204
|
+
" if (el != null) {\n",
|
205
|
+
" el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n",
|
206
|
+
" }\n",
|
207
|
+
" } else if (Date.now() < root._bokeh_timeout) {\n",
|
208
|
+
" setTimeout(display_loaded, 100)\n",
|
209
|
+
" }\n",
|
210
|
+
" }\n",
|
211
|
+
"\n",
|
212
|
+
" function run_callbacks() {\n",
|
213
|
+
" try {\n",
|
214
|
+
" root._bokeh_onload_callbacks.forEach(function(callback) {\n",
|
215
|
+
" if (callback != null)\n",
|
216
|
+
" callback();\n",
|
217
|
+
" });\n",
|
218
|
+
" } finally {\n",
|
219
|
+
" delete root._bokeh_onload_callbacks\n",
|
220
|
+
" }\n",
|
221
|
+
" console.debug(\"Bokeh: all callbacks have finished\");\n",
|
222
|
+
" }\n",
|
223
|
+
"\n",
|
224
|
+
" function load_libs(css_urls, js_urls, callback) {\n",
|
225
|
+
" if (css_urls == null) css_urls = [];\n",
|
226
|
+
" if (js_urls == null) js_urls = [];\n",
|
227
|
+
"\n",
|
228
|
+
" root._bokeh_onload_callbacks.push(callback);\n",
|
229
|
+
" if (root._bokeh_is_loading > 0) {\n",
|
230
|
+
" console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n",
|
231
|
+
" return null;\n",
|
232
|
+
" }\n",
|
233
|
+
" if (js_urls == null || js_urls.length === 0) {\n",
|
234
|
+
" run_callbacks();\n",
|
235
|
+
" return null;\n",
|
236
|
+
" }\n",
|
237
|
+
" console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n",
|
238
|
+
" root._bokeh_is_loading = css_urls.length + js_urls.length;\n",
|
239
|
+
"\n",
|
240
|
+
" function on_load() {\n",
|
241
|
+
" root._bokeh_is_loading--;\n",
|
242
|
+
" if (root._bokeh_is_loading === 0) {\n",
|
243
|
+
" console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n",
|
244
|
+
" run_callbacks()\n",
|
245
|
+
" }\n",
|
246
|
+
" }\n",
|
247
|
+
"\n",
|
248
|
+
" function on_error(url) {\n",
|
249
|
+
" console.error(\"failed to load \" + url);\n",
|
250
|
+
" }\n",
|
251
|
+
"\n",
|
252
|
+
" for (let i = 0; i < css_urls.length; i++) {\n",
|
253
|
+
" const url = css_urls[i];\n",
|
254
|
+
" const element = document.createElement(\"link\");\n",
|
255
|
+
" element.onload = on_load;\n",
|
256
|
+
" element.onerror = on_error.bind(null, url);\n",
|
257
|
+
" element.rel = \"stylesheet\";\n",
|
258
|
+
" element.type = \"text/css\";\n",
|
259
|
+
" element.href = url;\n",
|
260
|
+
" console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n",
|
261
|
+
" document.body.appendChild(element);\n",
|
262
|
+
" }\n",
|
263
|
+
"\n",
|
264
|
+
" for (let i = 0; i < js_urls.length; i++) {\n",
|
265
|
+
" const url = js_urls[i];\n",
|
266
|
+
" const element = document.createElement('script');\n",
|
267
|
+
" element.onload = on_load;\n",
|
268
|
+
" element.onerror = on_error.bind(null, url);\n",
|
269
|
+
" element.async = false;\n",
|
270
|
+
" element.src = url;\n",
|
271
|
+
" console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n",
|
272
|
+
" document.head.appendChild(element);\n",
|
273
|
+
" }\n",
|
274
|
+
" };\n",
|
275
|
+
"\n",
|
276
|
+
" function inject_raw_css(css) {\n",
|
277
|
+
" const element = document.createElement(\"style\");\n",
|
278
|
+
" element.appendChild(document.createTextNode(css));\n",
|
279
|
+
" document.body.appendChild(element);\n",
|
280
|
+
" }\n",
|
281
|
+
"\n",
|
282
|
+
" 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",
|
283
|
+
" const css_urls = [];\n",
|
284
|
+
"\n",
|
285
|
+
" const inline_js = [ function(Bokeh) {\n",
|
286
|
+
" Bokeh.set_log_level(\"info\");\n",
|
287
|
+
" },\n",
|
288
|
+
"function(Bokeh) {\n",
|
289
|
+
" }\n",
|
290
|
+
" ];\n",
|
291
|
+
"\n",
|
292
|
+
" function run_inline_js() {\n",
|
293
|
+
" if (root.Bokeh !== undefined || force === true) {\n",
|
294
|
+
" for (let i = 0; i < inline_js.length; i++) {\n",
|
295
|
+
" inline_js[i].call(root, root.Bokeh);\n",
|
296
|
+
" }\n",
|
297
|
+
"if (force === true) {\n",
|
298
|
+
" display_loaded();\n",
|
299
|
+
" }} else if (Date.now() < root._bokeh_timeout) {\n",
|
300
|
+
" setTimeout(run_inline_js, 100);\n",
|
301
|
+
" } else if (!root._bokeh_failed_load) {\n",
|
302
|
+
" console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n",
|
303
|
+
" root._bokeh_failed_load = true;\n",
|
304
|
+
" } else if (force !== true) {\n",
|
305
|
+
" const cell = $(document.getElementById(\"1002\")).parents('.cell').data().cell;\n",
|
306
|
+
" cell.output_area.append_execute_result(NB_LOAD_WARNING)\n",
|
307
|
+
" }\n",
|
308
|
+
" }\n",
|
309
|
+
"\n",
|
310
|
+
" if (root._bokeh_is_loading === 0) {\n",
|
311
|
+
" console.debug(\"Bokeh: BokehJS loaded, going straight to plotting\");\n",
|
312
|
+
" run_inline_js();\n",
|
313
|
+
" } else {\n",
|
314
|
+
" load_libs(css_urls, js_urls, function() {\n",
|
315
|
+
" console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n",
|
316
|
+
" run_inline_js();\n",
|
317
|
+
" });\n",
|
318
|
+
" }\n",
|
319
|
+
"}(window));"
|
320
|
+
],
|
321
|
+
"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));"
|
322
|
+
},
|
323
|
+
"metadata": {},
|
324
|
+
"output_type": "display_data"
|
325
|
+
}
|
326
|
+
],
|
327
|
+
"source": [
|
328
|
+
"#nbi:hide_out\n",
|
329
|
+
"# Make all outputs INLINE for default (why a hell this is needed !!!)\n",
|
330
|
+
"output_notebook()"
|
331
|
+
]
|
332
|
+
},
|
333
|
+
{
|
334
|
+
"cell_type": "markdown",
|
335
|
+
"metadata": {},
|
336
|
+
"source": [
|
337
|
+
"### Plotting from NetworkX\n",
|
338
|
+
"\n",
|
339
|
+
"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",
|
340
|
+
"\n",
|
341
|
+
"The example below shows a Bokeh plot of `nx.desargues_graph()`, setting some of the node and edge properties."
|
342
|
+
]
|
343
|
+
},
|
344
|
+
{
|
345
|
+
"cell_type": "code",
|
346
|
+
"execution_count": 3,
|
347
|
+
"metadata": {},
|
348
|
+
"outputs": [
|
349
|
+
{
|
350
|
+
"data": {
|
351
|
+
"text/html": [
|
352
|
+
"\n",
|
353
|
+
" <div class=\"bk-root\" id=\"3dc41e74-32d1-470e-a4ba-62c8a826ef98\" data-root-id=\"1005\"></div>\n"
|
354
|
+
]
|
355
|
+
},
|
356
|
+
"metadata": {},
|
357
|
+
"output_type": "display_data"
|
358
|
+
},
|
359
|
+
{
|
360
|
+
"data": {
|
361
|
+
"application/javascript": [
|
362
|
+
"(function(root) {\n",
|
363
|
+
" function embed_document(root) {\n",
|
364
|
+
" const docs_json = {\"dda4bd43-30d7-4285-952e-1e1ace0209b9\":{\"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\":{\"end\":2,\"start\":-2},\"id\":\"1004\",\"type\":\"Range1d\"},{\"attributes\":{\"coordinates\":null,\"group\":null},\"id\":\"1028\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"1043\",\"type\":\"Selection\"},{\"attributes\":{\"fill_color\":{\"value\":\"orange\"},\"size\":{\"value\":20}},\"id\":\"1009\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"1026\",\"type\":\"LinearScale\"},{\"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\":{\"end\":2,\"start\":-2},\"id\":\"1003\",\"type\":\"Range1d\"},{\"attributes\":{},\"id\":\"1042\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1029\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"1039\",\"type\":\"NodesOnly\"},{\"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\":{\"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\":{\"source\":{\"id\":\"1014\"}},\"id\":\"1016\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1040\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1041\",\"type\":\"Selection\"},{\"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\":\"1038\",\"type\":\"NodesOnly\"},{\"attributes\":{\"graph_layout\":{\"0\":[-1.1697191846420025,0.1173515414514772],\"1\":[-0.5057291920168522,-0.3301324932847872],\"10\":[0.5719975650503157,1.2631756750706118],\"11\":[1.313965098165436,0.7475138055892768],\"12\":[1.8,-0.26851044191988316],\"13\":[1.1664816220087437,-0.0959596247815966],\"14\":[0.13372947509740538,-0.3165161780939663],\"15\":[-0.5166063416282884,-1.3155585748399368],\"16\":[0.13524130085257552,-1.3686876436910196],\"17\":[1.2070076032178527,-1.1800792705596796],\"18\":[0.531189057176616,-0.7356351111910615],\"19\":[-0.10731944301045775,0.2842846361400993],\"2\":[0.19771666011850458,0.655978787503953],\"3\":[-0.5378765089311547,0.7138724373001639],\"4\":[-1.2210293189531412,1.1698194541672995],\"5\":[-1.7999176418742517,0.22483292849859016],\"6\":[-1.2970256277412264,-0.7904361743869417],\"7\":[-0.22598047907768307,-0.6182646310380427],\"8\":[0.48865747492340633,0.4088624653288193],\"9\":[-0.1647821187357951,1.4340884127366273]}},\"id\":\"1017\",\"type\":\"StaticLayoutProvider\"},{\"attributes\":{},\"id\":\"1027\",\"type\":\"LinearScale\"}],\"root_ids\":[\"1005\"]},\"title\":\"Bokeh Application\",\"version\":\"2.4.3\"}};\n",
|
365
|
+
" const render_items = [{\"docid\":\"dda4bd43-30d7-4285-952e-1e1ace0209b9\",\"root_ids\":[\"1005\"],\"roots\":{\"1005\":\"3dc41e74-32d1-470e-a4ba-62c8a826ef98\"}}];\n",
|
366
|
+
" root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
|
367
|
+
" }\n",
|
368
|
+
" if (root.Bokeh !== undefined) {\n",
|
369
|
+
" embed_document(root);\n",
|
370
|
+
" } else {\n",
|
371
|
+
" let attempts = 0;\n",
|
372
|
+
" const timer = setInterval(function(root) {\n",
|
373
|
+
" if (root.Bokeh !== undefined) {\n",
|
374
|
+
" clearInterval(timer);\n",
|
375
|
+
" embed_document(root);\n",
|
376
|
+
" } else {\n",
|
377
|
+
" attempts++;\n",
|
378
|
+
" if (attempts > 100) {\n",
|
379
|
+
" clearInterval(timer);\n",
|
380
|
+
" console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
|
381
|
+
" }\n",
|
382
|
+
" }\n",
|
383
|
+
" }, 10, root)\n",
|
384
|
+
" }\n",
|
385
|
+
"})(window);"
|
386
|
+
],
|
387
|
+
"application/vnd.bokehjs_exec.v0+json": ""
|
388
|
+
},
|
389
|
+
"metadata": {
|
390
|
+
"application/vnd.bokehjs_exec.v0+json": {
|
391
|
+
"id": "1005"
|
392
|
+
}
|
393
|
+
},
|
394
|
+
"output_type": "display_data"
|
395
|
+
}
|
396
|
+
],
|
397
|
+
"source": [
|
398
|
+
"import networkx as nx\n",
|
399
|
+
"from bokeh.models import Range1d, Plot\n",
|
400
|
+
"from bokeh.plotting import from_networkx\n",
|
401
|
+
"\n",
|
402
|
+
"G = nx.desargues_graph()\n",
|
403
|
+
"\n",
|
404
|
+
"# We could use figure here but don't want all the axes and titles\n",
|
405
|
+
"plot = Plot(x_range=Range1d(-2, 2), y_range=Range1d(-2, 2))\n",
|
406
|
+
"\n",
|
407
|
+
"# Create a Bokeh graph from the NetworkX input using nx.spring_layout\n",
|
408
|
+
"graph = from_networkx(G, nx.spring_layout, scale=1.8, center=(0,0))\n",
|
409
|
+
"plot.renderers.append(graph)\n",
|
410
|
+
"\n",
|
411
|
+
"# Set some of the default node glyph (Circle) properties\n",
|
412
|
+
"graph.node_renderer.glyph.update(size=20, fill_color=\"orange\")\n",
|
413
|
+
"\n",
|
414
|
+
"# Set some edge properties too\n",
|
415
|
+
"graph.edge_renderer.glyph.line_dash = [2,2]\n",
|
416
|
+
"\n",
|
417
|
+
"show(plot)"
|
418
|
+
]
|
419
|
+
},
|
420
|
+
{
|
421
|
+
"cell_type": "markdown",
|
422
|
+
"metadata": {},
|
423
|
+
"source": [
|
424
|
+
"### Adding Extra Data Columns.\n",
|
425
|
+
"\n",
|
426
|
+
"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."
|
427
|
+
]
|
428
|
+
},
|
429
|
+
{
|
430
|
+
"cell_type": "code",
|
431
|
+
"execution_count": 4,
|
432
|
+
"metadata": {},
|
433
|
+
"outputs": [
|
434
|
+
{
|
435
|
+
"data": {
|
436
|
+
"text/html": [
|
437
|
+
"\n",
|
438
|
+
" <div class=\"bk-root\" id=\"9e407a9f-45bb-4eb3-909f-73567b47b0e0\" data-root-id=\"1156\"></div>\n"
|
439
|
+
]
|
440
|
+
},
|
441
|
+
"metadata": {},
|
442
|
+
"output_type": "display_data"
|
443
|
+
},
|
444
|
+
{
|
445
|
+
"data": {
|
446
|
+
"application/javascript": [
|
447
|
+
"(function(root) {\n",
|
448
|
+
" function embed_document(root) {\n",
|
449
|
+
" const docs_json = {\"70f4192d-91f5-4be2-805d-96bc7590ba43\":{\"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\":{\"tools\":[{\"id\":\"1181\"}]},\"id\":\"1182\",\"type\":\"Toolbar\"},{\"attributes\":{\"fill_color\":{\"field\":\"colors\"},\"size\":{\"value\":20}},\"id\":\"1160\",\"type\":\"Circle\"},{\"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\":{\"coordinates\":null,\"data_source\":{\"id\":\"1161\"},\"glyph\":{\"id\":\"1160\"},\"group\":null,\"hover_glyph\":null,\"view\":{\"id\":\"1163\"}},\"id\":\"1162\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1216\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1202\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1217\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1164\",\"type\":\"MultiLine\"},{\"attributes\":{},\"id\":\"1218\",\"type\":\"Selection\"},{\"attributes\":{\"end\":2,\"start\":-2},\"id\":\"1154\",\"type\":\"Range1d\"},{\"attributes\":{\"source\":{\"id\":\"1161\"}},\"id\":\"1163\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1165\"},\"glyph\":{\"id\":\"1164\"},\"group\":null,\"hover_glyph\":null,\"view\":{\"id\":\"1167\"}},\"id\":\"1166\",\"type\":\"GlyphRenderer\"},{\"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\"},{\"attributes\":{},\"id\":\"1201\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1213\",\"type\":\"NodesOnly\"},{\"attributes\":{},\"id\":\"1214\",\"type\":\"NodesOnly\"},{\"attributes\":{\"callback\":null,\"tooltips\":\"index: @index\"},\"id\":\"1181\",\"type\":\"HoverTool\"},{\"attributes\":{},\"id\":\"1215\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"graph_layout\":{\"0\":[0.3887589353717005,-1.6463395451957297],\"1\":[1.3846658828275602,-0.9888706384388465],\"10\":[-0.3973296183215949,-1.1207122973322676],\"11\":[0.6918050631068496,-0.4881255395997623],\"12\":[0.06673400378400342,0.6367856992493871],\"13\":[-0.372190404725156,1.6549514681639979],\"14\":[0.7271639261632288,1.7891590455979385],\"15\":[0.3829194321748063,1.1235084976407805],\"16\":[0.8809036502719901,0.06648880890937106],\"17\":[-0.30216164550127095,-0.16880764210676003],\"18\":[-1.3471863197399672,-0.8450704388811822],\"19\":[-0.7146315969319081,-1.8],\"2\":[1.7420569157882306,-0.20269855379172452],\"3\":[1.348410997257696,0.8368982830124566],\"4\":[0.29447020642838123,0.1620331779290003],\"5\":[-0.06027364250284553,-0.6417199604835925],\"6\":[-0.6946893384592774,0.48328883898157654],\"7\":[-1.7429904289732252,0.20194290100155507],\"8\":[-1.3800370391698809,1.0068962141713491],\"9\":[-0.8963989788493182,-0.05960831882754418]}},\"id\":\"1168\",\"type\":\"StaticLayoutProvider\"},{\"attributes\":{\"source\":{\"id\":\"1165\"}},\"id\":\"1167\",\"type\":\"CDSView\"},{\"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\"}],\"root_ids\":[\"1156\"]},\"title\":\"Bokeh Application\",\"version\":\"2.4.3\"}};\n",
|
450
|
+
" const render_items = [{\"docid\":\"70f4192d-91f5-4be2-805d-96bc7590ba43\",\"root_ids\":[\"1156\"],\"roots\":{\"1156\":\"9e407a9f-45bb-4eb3-909f-73567b47b0e0\"}}];\n",
|
451
|
+
" root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
|
452
|
+
" }\n",
|
453
|
+
" if (root.Bokeh !== undefined) {\n",
|
454
|
+
" embed_document(root);\n",
|
455
|
+
" } else {\n",
|
456
|
+
" let attempts = 0;\n",
|
457
|
+
" const timer = setInterval(function(root) {\n",
|
458
|
+
" if (root.Bokeh !== undefined) {\n",
|
459
|
+
" clearInterval(timer);\n",
|
460
|
+
" embed_document(root);\n",
|
461
|
+
" } else {\n",
|
462
|
+
" attempts++;\n",
|
463
|
+
" if (attempts > 100) {\n",
|
464
|
+
" clearInterval(timer);\n",
|
465
|
+
" console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
|
466
|
+
" }\n",
|
467
|
+
" }\n",
|
468
|
+
" }, 10, root)\n",
|
469
|
+
" }\n",
|
470
|
+
"})(window);"
|
471
|
+
],
|
472
|
+
"application/vnd.bokehjs_exec.v0+json": ""
|
473
|
+
},
|
474
|
+
"metadata": {
|
475
|
+
"application/vnd.bokehjs_exec.v0+json": {
|
476
|
+
"id": "1156"
|
477
|
+
}
|
478
|
+
},
|
479
|
+
"output_type": "display_data"
|
480
|
+
}
|
481
|
+
],
|
482
|
+
"source": [
|
483
|
+
"from bokeh.models import HoverTool\n",
|
484
|
+
"from bokeh.palettes import Category20_20\n",
|
485
|
+
"\n",
|
486
|
+
"G = nx.desargues_graph() # always 20 nodes\n",
|
487
|
+
"\n",
|
488
|
+
"# We could use figure here but don't want all the axes and titles\n",
|
489
|
+
"plot = Plot(x_range=Range1d(-2, 2), y_range=Range1d(-2, 2))\n",
|
490
|
+
"\n",
|
491
|
+
"# Create a Bokeh graph from the NetworkX input using nx.spring_layout\n",
|
492
|
+
"graph = from_networkx(G, nx.spring_layout, scale=1.8, center=(0,0))\n",
|
493
|
+
"plot.renderers.append(graph)\n",
|
494
|
+
"\n",
|
495
|
+
"# Add some new columns to the node renderer data source\n",
|
496
|
+
"graph.node_renderer.data_source.data['index'] = list(range(len(G)))\n",
|
497
|
+
"graph.node_renderer.data_source.data['colors'] = Category20_20\n",
|
498
|
+
"\n",
|
499
|
+
"graph.node_renderer.glyph.update(size=20, fill_color=\"colors\")\n",
|
500
|
+
"\n",
|
501
|
+
"plot.add_tools(HoverTool(tooltips=\"index: @index\"))\n",
|
502
|
+
"\n",
|
503
|
+
"show(plot)"
|
504
|
+
]
|
505
|
+
},
|
506
|
+
{
|
507
|
+
"cell_type": "markdown",
|
508
|
+
"metadata": {},
|
509
|
+
"source": [
|
510
|
+
"### Inspection and Selection Policies\n",
|
511
|
+
"\n",
|
512
|
+
"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",
|
513
|
+
"\n",
|
514
|
+
"```python\n",
|
515
|
+
" graph.inspection_policy = NodesAndLinkedEdges()\n",
|
516
|
+
"```\n",
|
517
|
+
"\n",
|
518
|
+
"as the example below demonstrates."
|
519
|
+
]
|
520
|
+
},
|
521
|
+
{
|
522
|
+
"cell_type": "code",
|
523
|
+
"execution_count": 5,
|
524
|
+
"metadata": {},
|
525
|
+
"outputs": [
|
526
|
+
{
|
527
|
+
"data": {
|
528
|
+
"text/html": [
|
529
|
+
"\n",
|
530
|
+
" <div class=\"bk-root\" id=\"b16c5955-5218-48ed-a187-6639f276eb5a\" data-root-id=\"1331\"></div>\n"
|
531
|
+
]
|
532
|
+
},
|
533
|
+
"metadata": {},
|
534
|
+
"output_type": "display_data"
|
535
|
+
},
|
536
|
+
{
|
537
|
+
"data": {
|
538
|
+
"application/javascript": [
|
539
|
+
"(function(root) {\n",
|
540
|
+
" function embed_document(root) {\n",
|
541
|
+
" const docs_json = {\"5837c009-ac4b-4df6-9471-bd6b0d156b93\":{\"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\":\"1405\",\"type\":\"LinearScale\"},{\"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\":{\"end\":2,\"start\":-2},\"id\":\"1329\",\"type\":\"Range1d\"},{\"attributes\":{\"fill_color\":{\"value\":\"#abdda4\"},\"size\":{\"value\":25}},\"id\":\"1354\",\"type\":\"Circle\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1336\"},\"glyph\":{\"id\":\"1344\"},\"group\":null,\"hover_glyph\":{\"id\":\"1354\"},\"view\":{\"id\":\"1338\"}},\"id\":\"1337\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"tools\":[{\"id\":\"1366\"}]},\"id\":\"1367\",\"type\":\"Toolbar\"},{\"attributes\":{\"source\":{\"id\":\"1336\"}},\"id\":\"1338\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"group\":null},\"id\":\"1406\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"1364\",\"type\":\"NodesAndLinkedEdges\"},{\"attributes\":{\"line_color\":{\"value\":\"#abdda4\"},\"line_width\":{\"value\":4}},\"id\":\"1359\",\"type\":\"MultiLine\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1340\"},\"glyph\":{\"id\":\"1349\"},\"group\":null,\"hover_glyph\":{\"id\":\"1359\"},\"view\":{\"id\":\"1342\"}},\"id\":\"1341\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1417\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1404\",\"type\":\"LinearScale\"},{\"attributes\":{\"data\":{\"end\":[12,6,3,13,14,13,12,6,12,13,14,11,4,9,12,6,5,13,13,10,8,11,14,9,10,11,11,12,12,14],\"start\":[0,0,0,0,1,1,1,2,2,2,3,3,3,4,4,4,4,4,5,5,6,7,7,7,9,9,10,10,11,11]},\"selected\":{\"id\":\"1420\"},\"selection_policy\":{\"id\":\"1419\"}},\"id\":\"1340\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_alpha\":{\"value\":0.8},\"line_color\":{\"value\":\"#cccccc\"},\"line_width\":{\"value\":2}},\"id\":\"1349\",\"type\":\"MultiLine\"},{\"attributes\":{},\"id\":\"1418\",\"type\":\"Selection\"},{\"attributes\":{\"end\":2,\"start\":-2},\"id\":\"1330\",\"type\":\"Range1d\"},{\"attributes\":{\"callback\":null,\"tooltips\":null},\"id\":\"1366\",\"type\":\"HoverTool\"},{\"attributes\":{\"source\":{\"id\":\"1340\"}},\"id\":\"1342\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1420\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1419\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"graph_layout\":{\"0\":[-0.4833281450441862,-0.23863243391835653],\"1\":[0.3568648536585474,0.4296361393270891],\"10\":[0.5777886700411361,0.3425039218236356],\"11\":[0.6058554964558718,-0.22501431324155174],\"12\":[-0.011015526964565358,0.17495954159548935],\"13\":[-0.35612534445256916,0.4355367121728019],\"14\":[0.8083581253680809,-0.3905562287059248],\"2\":[-0.8172910990866016,0.32376247349591875],\"3\":[0.1570810044630715,-0.5546962694608853],\"4\":[-0.1343029889959071,-0.022563134782480503],\"5\":[0.0271896160460196,0.7351840882226742],\"6\":[-1.046165508232688,-0.20491107595703953],\"7\":[1.2781533699086591,-0.3722266628588799],\"8\":[-1.8,-0.4515456212125839],\"9\":[0.8369374768351313,0.018562863500093597]}},\"id\":\"1343\",\"type\":\"StaticLayoutProvider\"},{\"attributes\":{},\"id\":\"1416\",\"type\":\"NodesOnly\"},{\"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\":{\"fill_color\":{\"value\":\"#2b83ba\"},\"size\":{\"value\":25}},\"id\":\"1344\",\"type\":\"Circle\"}],\"root_ids\":[\"1331\"]},\"title\":\"Bokeh Application\",\"version\":\"2.4.3\"}};\n",
|
542
|
+
" const render_items = [{\"docid\":\"5837c009-ac4b-4df6-9471-bd6b0d156b93\",\"root_ids\":[\"1331\"],\"roots\":{\"1331\":\"b16c5955-5218-48ed-a187-6639f276eb5a\"}}];\n",
|
543
|
+
" root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
|
544
|
+
" }\n",
|
545
|
+
" if (root.Bokeh !== undefined) {\n",
|
546
|
+
" embed_document(root);\n",
|
547
|
+
" } else {\n",
|
548
|
+
" let attempts = 0;\n",
|
549
|
+
" const timer = setInterval(function(root) {\n",
|
550
|
+
" if (root.Bokeh !== undefined) {\n",
|
551
|
+
" clearInterval(timer);\n",
|
552
|
+
" embed_document(root);\n",
|
553
|
+
" } else {\n",
|
554
|
+
" attempts++;\n",
|
555
|
+
" if (attempts > 100) {\n",
|
556
|
+
" clearInterval(timer);\n",
|
557
|
+
" console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
|
558
|
+
" }\n",
|
559
|
+
" }\n",
|
560
|
+
" }, 10, root)\n",
|
561
|
+
" }\n",
|
562
|
+
"})(window);"
|
563
|
+
],
|
564
|
+
"application/vnd.bokehjs_exec.v0+json": ""
|
565
|
+
},
|
566
|
+
"metadata": {
|
567
|
+
"application/vnd.bokehjs_exec.v0+json": {
|
568
|
+
"id": "1331"
|
569
|
+
}
|
570
|
+
},
|
571
|
+
"output_type": "display_data"
|
572
|
+
}
|
573
|
+
],
|
574
|
+
"source": [
|
575
|
+
"from bokeh.models.graphs import NodesAndLinkedEdges\n",
|
576
|
+
"from bokeh.models import Circle, HoverTool, MultiLine\n",
|
577
|
+
"\n",
|
578
|
+
"G = nx.gnm_random_graph(15, 30)\n",
|
579
|
+
"\n",
|
580
|
+
"# We could use figure here but don't want all the axes and titles\n",
|
581
|
+
"plot = Plot(x_range=Range1d(-2, 2), y_range=Range1d(-2 ,2))\n",
|
582
|
+
"\n",
|
583
|
+
"# Create a Bokeh graph from the NetworkX input using nx.spring_layout\n",
|
584
|
+
"graph = from_networkx(G, nx.spring_layout, scale=1.8, center=(0,0))\n",
|
585
|
+
"plot.renderers.append(graph)\n",
|
586
|
+
"\n",
|
587
|
+
"# Blue circles for nodes, and light grey lines for edges\n",
|
588
|
+
"graph.node_renderer.glyph = Circle(size=25, fill_color='#2b83ba')\n",
|
589
|
+
"graph.edge_renderer.glyph = MultiLine(line_color=\"#cccccc\", line_alpha=0.8, line_width=2)\n",
|
590
|
+
"\n",
|
591
|
+
"# green hover for both nodes and edges\n",
|
592
|
+
"graph.node_renderer.hover_glyph = Circle(size=25, fill_color='#abdda4')\n",
|
593
|
+
"graph.edge_renderer.hover_glyph = MultiLine(line_color='#abdda4', line_width=4)\n",
|
594
|
+
"\n",
|
595
|
+
"# When we hover over nodes, highlight adjecent edges too\n",
|
596
|
+
"graph.inspection_policy = NodesAndLinkedEdges()\n",
|
597
|
+
"\n",
|
598
|
+
"plot.add_tools(HoverTool(tooltips=None))\n",
|
599
|
+
"\n",
|
600
|
+
"show(plot)"
|
601
|
+
]
|
602
|
+
}
|
603
|
+
],
|
604
|
+
"metadata": {
|
605
|
+
"kernelspec": {
|
606
|
+
"display_name": "Python 3",
|
607
|
+
"language": "python",
|
608
|
+
"name": "python3"
|
609
|
+
},
|
610
|
+
"language_info": {
|
611
|
+
"codemirror_mode": {
|
612
|
+
"name": "ipython",
|
613
|
+
"version": 3
|
614
|
+
},
|
615
|
+
"file_extension": ".py",
|
616
|
+
"mimetype": "text/x-python",
|
617
|
+
"name": "python",
|
618
|
+
"nbconvert_exporter": "python",
|
619
|
+
"pygments_lexer": "ipython3",
|
620
|
+
"version": "3.7.9"
|
621
|
+
}
|
622
|
+
},
|
623
|
+
"nbformat": 4,
|
624
|
+
"nbformat_minor": 4
|
625
|
+
}
|