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,732 @@
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "markdown",
5
+ "metadata": {},
6
+ "source": [
7
+ "### An Interactive Monty Hall Simulation"
8
+ ]
9
+ },
10
+ {
11
+ "cell_type": "markdown",
12
+ "metadata": {},
13
+ "source": [
14
+ "`nbinteract` was designed to make interactive explanations easy to create. In this tutorial, we will show the process of writing a simulation from scratch and visualizing the results interactively.\n",
15
+ "\n",
16
+ "In this section, you will create an interactive simulation of the Monty Hall Problem. You may continue writing code in the notebook from the previous section or create a new one for this section."
17
+ ]
18
+ },
19
+ {
20
+ "cell_type": "markdown",
21
+ "metadata": {},
22
+ "source": [
23
+ "#### The Monty Hall Problem\n",
24
+ "\n",
25
+ "The Monty Hall Problem ([Wikipedia][wiki]) is a famous probability problem that has stumped many, mathematicians included. The problem goes something like this:\n",
26
+ "\n",
27
+ "> Suppose you're on a game show, and you're given the choice of three doors: Behind one door is a car; behind the others, goats. You pick a door, say No. 1, and the host, who knows what's behind the doors, opens another door, say No. 3, which has a goat. He then says to you, \"Do you want to switch your choice to door No. 2?\" Is it to your advantage to switch your choice?\n",
28
+ "\n",
29
+ "Perhaps unintuitively, you will win the prize about twice as often if you switch doors. We can show this through simulation.\n",
30
+ "\n",
31
+ "[wiki]: https://en.wikipedia.org/wiki/Monty_Hall_problem"
32
+ ]
33
+ },
34
+ {
35
+ "cell_type": "markdown",
36
+ "metadata": {},
37
+ "source": [
38
+ "#### Simulating a Game"
39
+ ]
40
+ },
41
+ {
42
+ "cell_type": "markdown",
43
+ "metadata": {},
44
+ "source": [
45
+ "One way to write an interactive explanation is to write functions and create interactions for each one as applicable. Composing the functions allows you to create more complicated processes. `nbinteract` also provides tools for interactive visualizations as we will soon see.\n",
46
+ "\n",
47
+ "Let's start with defining a function to simulate one round of the Monty Hall Problem."
48
+ ]
49
+ },
50
+ {
51
+ "cell_type": "code",
52
+ "execution_count": 1,
53
+ "metadata": {},
54
+ "outputs": [],
55
+ "source": [
56
+ "from ipywidgets import interact\n",
57
+ "import numpy as np\n",
58
+ "import random\n",
59
+ "\n",
60
+ "PRIZES = ['Car', 'Goat 1', 'Goat 2']\n",
61
+ "\n",
62
+ "def monty_hall(example_num=0):\n",
63
+ " '''\n",
64
+ " Simulates one round of the Monty Hall Problem. Outputs a tuple of\n",
65
+ " (result if stay, result if switch, result behind opened door) where\n",
66
+ " each results is one of PRIZES.\n",
67
+ " '''\n",
68
+ " pick = random.choice(PRIZES)\n",
69
+ " opened = random.choice(\n",
70
+ " [p for p in PRIZES if p != pick and p != 'Car']\n",
71
+ " )\n",
72
+ " remainder = next(p for p in PRIZES if p != pick and p != opened)\n",
73
+ " return (pick, remainder, opened)"
74
+ ]
75
+ },
76
+ {
77
+ "cell_type": "markdown",
78
+ "metadata": {},
79
+ "source": [
80
+ "Note that the `example_num` argument is passed in but not used in the `monty_hall` function. Although it's unneeded for the function, it is easier to use `interact` to call functions when they have arguments to manipulate:"
81
+ ]
82
+ },
83
+ {
84
+ "cell_type": "code",
85
+ "execution_count": 2,
86
+ "metadata": {},
87
+ "outputs": [
88
+ {
89
+ "data": {
90
+ "application/vnd.jupyter.widget-view+json": {
91
+ "model_id": "f7bc19921ed64ea98d52d1c59b0ff6fc",
92
+ "version_major": 2,
93
+ "version_minor": 0
94
+ },
95
+ "text/plain": [
96
+ "interactive(children=(IntSlider(value=0, description='example_num'), Output()), _dom_classes=('widget-interact…"
97
+ ]
98
+ },
99
+ "metadata": {},
100
+ "output_type": "display_data"
101
+ }
102
+ ],
103
+ "source": [
104
+ "interact(monty_hall, example_num=(0, 100));"
105
+ ]
106
+ },
107
+ {
108
+ "cell_type": "markdown",
109
+ "metadata": {},
110
+ "source": [
111
+ "By interacting with the function above, we are able to informally verify that the function never allows the host to open a door with a car behind it. Even though the function is random we are able to use interaction to examine its long-term behavior!\n",
112
+ "\n",
113
+ "We'll continue by defining a function to simulate a game of Monty Hall and output the winning strategy for that game:"
114
+ ]
115
+ },
116
+ {
117
+ "cell_type": "code",
118
+ "execution_count": 3,
119
+ "metadata": {},
120
+ "outputs": [
121
+ {
122
+ "data": {
123
+ "application/vnd.jupyter.widget-view+json": {
124
+ "model_id": "4e20d1c8f3c7425590ff1cea1df7d648",
125
+ "version_major": 2,
126
+ "version_minor": 0
127
+ },
128
+ "text/plain": [
129
+ "interactive(children=(IntSlider(value=0, description='example_num'), Output()), _dom_classes=('widget-interact…"
130
+ ]
131
+ },
132
+ "metadata": {},
133
+ "output_type": "display_data"
134
+ }
135
+ ],
136
+ "source": [
137
+ "def winner(example_num=0):\n",
138
+ " '''\n",
139
+ " Plays a game of Monty Hall. If staying with the original door wins\n",
140
+ " a car, return 'stay'. Otherwise, the remaining door contains the car\n",
141
+ " so 'switch' would have won.\n",
142
+ " '''\n",
143
+ " picked, _, _ = monty_hall()\n",
144
+ " return 'stay' if picked == 'Car' else 'switch'\n",
145
+ "\n",
146
+ "interact(winner, example_num=(0, 100));"
147
+ ]
148
+ },
149
+ {
150
+ "cell_type": "markdown",
151
+ "metadata": {},
152
+ "source": [
153
+ "Again, a bit of interaction lets us quickly examine the behavior of `winner`. We can see that `switch` appears more often than `stay`."
154
+ ]
155
+ },
156
+ {
157
+ "cell_type": "markdown",
158
+ "metadata": {},
159
+ "source": [
160
+ "#### Brief Introduction to Plotting with `nbinteract`"
161
+ ]
162
+ },
163
+ {
164
+ "cell_type": "markdown",
165
+ "metadata": {},
166
+ "source": [
167
+ "Let's create an interactive bar chart of the number of times each strategy wins. We'll use `nbinteract`'s plotting functionality.\n",
168
+ "\n",
169
+ "`nbi.bar` creates a bar chart:"
170
+ ]
171
+ },
172
+ {
173
+ "cell_type": "code",
174
+ "execution_count": 4,
175
+ "metadata": {},
176
+ "outputs": [
177
+ {
178
+ "data": {
179
+ "application/vnd.jupyter.widget-view+json": {
180
+ "model_id": "d5534d93a8fd4fa08844b24c2dffe6fe",
181
+ "version_major": 2,
182
+ "version_minor": 0
183
+ },
184
+ "text/plain": [
185
+ "VBox(children=(interactive(children=(Output(),), _dom_classes=('widget-interact',)), Figure(axes=[Axis(scale=O…"
186
+ ]
187
+ },
188
+ "metadata": {},
189
+ "output_type": "display_data"
190
+ }
191
+ ],
192
+ "source": [
193
+ "import nbinteract as nbi\n",
194
+ "\n",
195
+ "nbi.bar(['a', 'b'], [4, 6])"
196
+ ]
197
+ },
198
+ {
199
+ "cell_type": "markdown",
200
+ "metadata": {},
201
+ "source": [
202
+ "To make an interactive chart, pass a response function in place of one or both of `bar`'s arguments."
203
+ ]
204
+ },
205
+ {
206
+ "cell_type": "code",
207
+ "execution_count": 5,
208
+ "metadata": {},
209
+ "outputs": [
210
+ {
211
+ "data": {
212
+ "application/vnd.jupyter.widget-view+json": {
213
+ "model_id": "f0afa697e6a24f1c9fd422b0b660d09a",
214
+ "version_major": 2,
215
+ "version_minor": 0
216
+ },
217
+ "text/plain": [
218
+ "VBox(children=(interactive(children=(IntSlider(value=4, description='n', max=7, min=1), IntSlider(value=5, des…"
219
+ ]
220
+ },
221
+ "metadata": {},
222
+ "output_type": "display_data"
223
+ }
224
+ ],
225
+ "source": [
226
+ "# This function generates the x-values\n",
227
+ "def categories(n):\n",
228
+ " return list('abcdefg')[:n]\n",
229
+ "\n",
230
+ "# This function generates the y-values (heights of bars)\n",
231
+ "# The y response function always takes in the x-values as its\n",
232
+ "# first argument\n",
233
+ "def offset_y(xs, offset):\n",
234
+ " num_categories = len(xs)\n",
235
+ " return np.arange(num_categories) + offset\n",
236
+ "\n",
237
+ "# Each argument of the response functions is passed in as a keyword\n",
238
+ "# argument to `nbi.bar` in the same format as `interact`\n",
239
+ "nbi.bar(categories, offset_y, n=(1, 7), offset=(0, 10))"
240
+ ]
241
+ },
242
+ {
243
+ "cell_type": "markdown",
244
+ "metadata": {},
245
+ "source": [
246
+ "#### Visualizing the Winners"
247
+ ]
248
+ },
249
+ {
250
+ "cell_type": "markdown",
251
+ "metadata": {},
252
+ "source": [
253
+ "Now, let's turn back to our original goal: plotting the winners as games are played.\n",
254
+ "\n",
255
+ "We can call `winner` many times and use `nbi.bar` to show the bar chart as it's built over the trials.\n",
256
+ "\n",
257
+ "Note that we compute the results before defining our function `won`. This has two benefits over running the simulation directly in `won`:\n",
258
+ "\n",
259
+ "1. It gives us consistency in our interaction. If we run a random simulation in `won`, moving the slider from 500 to a different number back to 500 will give us a slightly different bar chart.\n",
260
+ "2. It makes the interaction smoother since less work is being done each time the slider is moved."
261
+ ]
262
+ },
263
+ {
264
+ "cell_type": "code",
265
+ "execution_count": 6,
266
+ "metadata": {},
267
+ "outputs": [
268
+ {
269
+ "data": {
270
+ "application/vnd.jupyter.widget-view+json": {
271
+ "model_id": "0bf2fadf696943269dd528cd8d00e76a",
272
+ "version_major": 2,
273
+ "version_minor": 0
274
+ },
275
+ "text/plain": [
276
+ "VBox(children=(interactive(children=(IntSlider(value=500, description='num_games', max=1000, min=1), Output())…"
277
+ ]
278
+ },
279
+ "metadata": {},
280
+ "output_type": "display_data"
281
+ }
282
+ ],
283
+ "source": [
284
+ "categories = ['stay', 'switch']\n",
285
+ "\n",
286
+ "winners = [winner() for _ in range(1000)]\n",
287
+ "\n",
288
+ "# Note that the the first argument to the y response function\n",
289
+ "# will be the x-values which we don't need\n",
290
+ "def won(_, num_games):\n",
291
+ " '''\n",
292
+ " Outputs a 2-tuple of the number of times each strategy won\n",
293
+ " after num_games games.\n",
294
+ " '''\n",
295
+ " return (winners[:num_games].count('stay'),\n",
296
+ " winners[:num_games].count('switch'))\n",
297
+ "\n",
298
+ "nbi.bar(categories, won, num_games=(1, 1000))"
299
+ ]
300
+ },
301
+ {
302
+ "cell_type": "markdown",
303
+ "metadata": {},
304
+ "source": [
305
+ "Note that by default the plot will adjust its y-axis to match the limits of the data. We can manually set the y-axis limits to better visualize this plot being built up. We will also add labels to our plot:"
306
+ ]
307
+ },
308
+ {
309
+ "cell_type": "code",
310
+ "execution_count": 7,
311
+ "metadata": {},
312
+ "outputs": [
313
+ {
314
+ "data": {
315
+ "application/vnd.jupyter.widget-view+json": {
316
+ "model_id": "4f862fa39f0444e19e8aba63adc5dcbe",
317
+ "version_major": 2,
318
+ "version_minor": 0
319
+ },
320
+ "text/plain": [
321
+ "VBox(children=(interactive(children=(IntSlider(value=500, description='num_games', max=1000, min=1), Output())…"
322
+ ]
323
+ },
324
+ "metadata": {},
325
+ "output_type": "display_data"
326
+ }
327
+ ],
328
+ "source": [
329
+ "options = {\n",
330
+ " 'title': 'Number of times each strategy wins',\n",
331
+ " 'xlabel': 'Strategy',\n",
332
+ " 'ylabel': 'Number of wins',\n",
333
+ " 'ylim': (0, 700),\n",
334
+ "}\n",
335
+ "\n",
336
+ "nbi.bar(categories, won, options=options, num_games=(1, 1000))"
337
+ ]
338
+ },
339
+ {
340
+ "cell_type": "markdown",
341
+ "metadata": {},
342
+ "source": [
343
+ "We can get even fancy and use the [`Play` widget][play] from `ipywidgets` to animate the plot.\n",
344
+ "\n",
345
+ "[play]: http://ipywidgets.readthedocs.io/en/stable/examples/Widget%20List.html#Play-(Animation)-widget"
346
+ ]
347
+ },
348
+ {
349
+ "cell_type": "code",
350
+ "execution_count": 8,
351
+ "metadata": {},
352
+ "outputs": [
353
+ {
354
+ "data": {
355
+ "application/vnd.jupyter.widget-view+json": {
356
+ "model_id": "c7baaa8b023e48648c27b988f617ce90",
357
+ "version_major": 2,
358
+ "version_minor": 0
359
+ },
360
+ "text/plain": [
361
+ "VBox(children=(interactive(children=(Play(value=0, description='num_games', interval=17, max=1000, step=10), O…"
362
+ ]
363
+ },
364
+ "metadata": {},
365
+ "output_type": "display_data"
366
+ }
367
+ ],
368
+ "source": [
369
+ "from ipywidgets import Play\n",
370
+ "\n",
371
+ "nbi.bar(categories, won, options=options,\n",
372
+ " num_games=Play(min=0, max=1000, step=10, value=0, interval=17))"
373
+ ]
374
+ },
375
+ {
376
+ "cell_type": "markdown",
377
+ "metadata": {},
378
+ "source": [
379
+ "Now we have an interactive, animated bar plot showing the distribution of wins over time for both Monty Hall strategies. This is a convincing argument that switching is better than staying. In fact, the bar plot above suggests that switching is about twice as likely to win as staying!"
380
+ ]
381
+ },
382
+ {
383
+ "cell_type": "markdown",
384
+ "metadata": {},
385
+ "source": [
386
+ "#### Simulating Sets of Games"
387
+ ]
388
+ },
389
+ {
390
+ "cell_type": "markdown",
391
+ "metadata": {},
392
+ "source": [
393
+ "Is switching actually twice as likely to win? We can again use simulation to answer this question by simulating sets of 50 games at a time. recording the proportion of times `switch` wins."
394
+ ]
395
+ },
396
+ {
397
+ "cell_type": "code",
398
+ "execution_count": 9,
399
+ "metadata": {
400
+ "scrolled": true
401
+ },
402
+ "outputs": [
403
+ {
404
+ "data": {
405
+ "application/vnd.jupyter.widget-view+json": {
406
+ "model_id": "d6a69e3020b84b22999e421cd02eb5ed",
407
+ "version_major": 2,
408
+ "version_minor": 0
409
+ },
410
+ "text/plain": [
411
+ "interactive(children=(IntSlider(value=55, description='sample_size', min=10), Output()), _dom_classes=('widget…"
412
+ ]
413
+ },
414
+ "metadata": {},
415
+ "output_type": "display_data"
416
+ }
417
+ ],
418
+ "source": [
419
+ "def prop_wins(sample_size):\n",
420
+ " '''Returns proportion of times switching wins after sample_size games.'''\n",
421
+ " return sum(winner() == 'switch' for _ in range(sample_size)) / sample_size\n",
422
+ "\n",
423
+ "interact(prop_wins, sample_size=(10, 100));"
424
+ ]
425
+ },
426
+ {
427
+ "cell_type": "markdown",
428
+ "metadata": {},
429
+ "source": [
430
+ "We can then define a function to play sets of games and generate a list of win proportions for each set:"
431
+ ]
432
+ },
433
+ {
434
+ "cell_type": "code",
435
+ "execution_count": 10,
436
+ "metadata": {
437
+ "scrolled": false
438
+ },
439
+ "outputs": [
440
+ {
441
+ "data": {
442
+ "application/vnd.jupyter.widget-view+json": {
443
+ "model_id": "a7fe055237e04c91adb52dae525e7b01",
444
+ "version_major": 2,
445
+ "version_minor": 0
446
+ },
447
+ "text/plain": [
448
+ "interactive(children=(IntSlider(value=55, description='sample_size', min=10), IntSlider(value=55, description=…"
449
+ ]
450
+ },
451
+ "metadata": {},
452
+ "output_type": "display_data"
453
+ }
454
+ ],
455
+ "source": [
456
+ "def generate_proportions(sample_size, repetitions):\n",
457
+ " '''\n",
458
+ " Returns an array of length reptitions. Each element in the list is the\n",
459
+ " proportion of times switching won in sample_size games.\n",
460
+ " '''\n",
461
+ " return np.array([prop_wins(sample_size) for _ in range(repetitions)])\n",
462
+ "\n",
463
+ "interact(generate_proportions, sample_size=(10, 100), repetitions=(10, 100));"
464
+ ]
465
+ },
466
+ {
467
+ "cell_type": "markdown",
468
+ "metadata": {},
469
+ "source": [
470
+ "Interacting with `generate_proportions` shows the relationship between its arguments `sample_size` and `repetitions` more quickly than reading the function itself!"
471
+ ]
472
+ },
473
+ {
474
+ "cell_type": "markdown",
475
+ "metadata": {},
476
+ "source": [
477
+ "#### Visualizing Proportions"
478
+ ]
479
+ },
480
+ {
481
+ "cell_type": "markdown",
482
+ "metadata": {},
483
+ "source": [
484
+ "We can then use `nbi.hist` to show these proportions being computed over runs.\n",
485
+ "\n",
486
+ "Again, we pre-compute the simulations and interact with a function that takes a slice of the simulations to make the interaction faster."
487
+ ]
488
+ },
489
+ {
490
+ "cell_type": "code",
491
+ "execution_count": 11,
492
+ "metadata": {},
493
+ "outputs": [
494
+ {
495
+ "data": {
496
+ "application/vnd.jupyter.widget-view+json": {
497
+ "model_id": "f248871830ca4347a74fa9d72f57eb1d",
498
+ "version_major": 2,
499
+ "version_minor": 0
500
+ },
501
+ "text/plain": [
502
+ "VBox(children=(interactive(children=(Play(value=0, description='num_sets', interval=50), Output()), _dom_class…"
503
+ ]
504
+ },
505
+ "metadata": {},
506
+ "output_type": "display_data"
507
+ }
508
+ ],
509
+ "source": [
510
+ "# Play the game 10 times, recording the proportion of times switching wins.\n",
511
+ "# Repeat 100 times to record 100 proportions\n",
512
+ "proportions = generate_proportions(sample_size=10, repetitions=100)\n",
513
+ "\n",
514
+ "def props_up_to(num_sets):\n",
515
+ " return proportions[:num_sets]\n",
516
+ "\n",
517
+ "nbi.hist(props_up_to, num_sets=Play(min=0, max=100, value=0, interval=50))"
518
+ ]
519
+ },
520
+ {
521
+ "cell_type": "markdown",
522
+ "metadata": {},
523
+ "source": [
524
+ "As with last time, it's illustrative to specify the limits of the axes:"
525
+ ]
526
+ },
527
+ {
528
+ "cell_type": "code",
529
+ "execution_count": 12,
530
+ "metadata": {},
531
+ "outputs": [
532
+ {
533
+ "data": {
534
+ "application/vnd.jupyter.widget-view+json": {
535
+ "model_id": "d962e61f2d9d4c2fba952089e171f36d",
536
+ "version_major": 2,
537
+ "version_minor": 0
538
+ },
539
+ "text/plain": [
540
+ "VBox(children=(interactive(children=(Play(value=0, description='num_sets', interval=50), Output()), _dom_class…"
541
+ ]
542
+ },
543
+ "metadata": {},
544
+ "output_type": "display_data"
545
+ }
546
+ ],
547
+ "source": [
548
+ "options = {\n",
549
+ " 'title': 'Distribution of win proportion over 100 sets of 10 games when switching',\n",
550
+ " 'xlabel': 'Proportions',\n",
551
+ " 'ylabel': 'Percent per area',\n",
552
+ " 'xlim': (0.3, 1),\n",
553
+ " 'ylim': (0, 3),\n",
554
+ " 'bins': 7,\n",
555
+ "}\n",
556
+ "\n",
557
+ "nbi.hist(props_up_to, options=options, num_sets=Play(min=0, max=100, value=0, interval=50))"
558
+ ]
559
+ },
560
+ {
561
+ "cell_type": "markdown",
562
+ "metadata": {},
563
+ "source": [
564
+ "We can see that the distribution of wins is centered at roughly 0.66 but the distribution almost spans the entire x-axis. Will increasing the sample size make our distribution more narrow? Will increasing repetitions do the trick? Or both? We can find out through simulation and interaction."
565
+ ]
566
+ },
567
+ {
568
+ "cell_type": "markdown",
569
+ "metadata": {},
570
+ "source": [
571
+ "We'll start with increasing the sample size:"
572
+ ]
573
+ },
574
+ {
575
+ "cell_type": "code",
576
+ "execution_count": 13,
577
+ "metadata": {},
578
+ "outputs": [
579
+ {
580
+ "data": {
581
+ "application/vnd.jupyter.widget-view+json": {
582
+ "model_id": "d4cef03fa60f436e929eeb541808dc62",
583
+ "version_major": 2,
584
+ "version_minor": 0
585
+ },
586
+ "text/plain": [
587
+ "VBox(children=(interactive(children=(Play(value=10, description='sample_size', interval=50, min=10), Output())…"
588
+ ]
589
+ },
590
+ "metadata": {},
591
+ "output_type": "display_data"
592
+ }
593
+ ],
594
+ "source": [
595
+ "varying_sample_size = [generate_proportions(sample_size, repetitions=100)\n",
596
+ " for sample_size in range(10, 101)]\n",
597
+ "\n",
598
+ "def props_for_sample_size(sample_size):\n",
599
+ " return varying_sample_size[sample_size - 10]\n",
600
+ "\n",
601
+ "changed_options = {\n",
602
+ " 'title': 'Distribution of win proportions as sample size increases',\n",
603
+ " 'ylim': (0, 6),\n",
604
+ " 'bins': 20,\n",
605
+ "}\n",
606
+ "\n",
607
+ "nbi.hist(props_for_sample_size,\n",
608
+ " options={**options, **changed_options},\n",
609
+ " sample_size=Play(min=10, max=100, value=10, interval=50))"
610
+ ]
611
+ },
612
+ {
613
+ "cell_type": "markdown",
614
+ "metadata": {},
615
+ "source": [
616
+ "So increasing the sample size makes the distribution narrower. We can now see more clearly that the distribution is centered at 0.66.\n",
617
+ "\n",
618
+ "We can repeat the process for the number of repetitions:"
619
+ ]
620
+ },
621
+ {
622
+ "cell_type": "code",
623
+ "execution_count": 14,
624
+ "metadata": {},
625
+ "outputs": [
626
+ {
627
+ "data": {
628
+ "application/vnd.jupyter.widget-view+json": {
629
+ "model_id": "f2dafc198d9441b380266cdedc1fccab",
630
+ "version_major": 2,
631
+ "version_minor": 0
632
+ },
633
+ "text/plain": [
634
+ "VBox(children=(interactive(children=(Play(value=10, description='reps', interval=50, min=10), Output()), _dom_…"
635
+ ]
636
+ },
637
+ "metadata": {},
638
+ "output_type": "display_data"
639
+ }
640
+ ],
641
+ "source": [
642
+ "varying_reps = [generate_proportions(sample_size=10, repetitions=reps) for reps in range(10, 101)]\n",
643
+ "\n",
644
+ "def props_for_reps(reps):\n",
645
+ " return varying_reps[reps - 10]\n",
646
+ "\n",
647
+ "changed_options = {\n",
648
+ " 'title': 'Distribution of win proportions as repetitions increase',\n",
649
+ " 'ylim': (0, 5),\n",
650
+ "}\n",
651
+ "\n",
652
+ "nbi.hist(props_for_reps,\n",
653
+ " options={**options, **changed_options},\n",
654
+ " reps=Play(min=10, max=100, value=10, interval=50))"
655
+ ]
656
+ },
657
+ {
658
+ "cell_type": "markdown",
659
+ "metadata": {},
660
+ "source": [
661
+ "Our distribution gets smoother as the number of repetitions increases since we have more proportions to plot. However, the spread of the distribution remains the same.\n",
662
+ "\n",
663
+ "#### Results\n",
664
+ "Through simulation, we've shown that increasing the sample size causes our distribution of proportions to become more narrowly distributed. Increasing the number of repetitions makes our distribution look smoother when plotted but doesn't affect the distribution spread.\n",
665
+ "\n",
666
+ "We've also seen through increasing the sample size shows that our distribution is centered at 0.66. This implies that the probability of winning the Monty Hall game when switching is around 0.66, and thus the probability of winning the Monty Hall game when staying is around 0.33."
667
+ ]
668
+ },
669
+ {
670
+ "cell_type": "markdown",
671
+ "metadata": {},
672
+ "source": [
673
+ "#### Conclusion"
674
+ ]
675
+ },
676
+ {
677
+ "cell_type": "markdown",
678
+ "metadata": {},
679
+ "source": [
680
+ "Through this extended example, we've shown how interaction and visualization can help explore ideas and convincingly explain concepts. Congrats on making it through the tutorial! Let's now publish your results to the web.\n",
681
+ "\n",
682
+ "Like the previous section of the tutorial, you should open a terminal and run the following command:\n",
683
+ "\n",
684
+ "```bash\n",
685
+ "nbinteract {notebook}\n",
686
+ "```\n",
687
+ "\n",
688
+ "Where `{notebook}` is replaced with the name of the notebook you wish to convert (e.g. `nbinteract monty.ipynb`). Now, commit and push your changes:\n",
689
+ "\n",
690
+ "```bash\n",
691
+ "git add -A\n",
692
+ "git commit -m \"Publish nb\"\n",
693
+ "git push origin master\n",
694
+ "```\n",
695
+ "\n",
696
+ "As before, you will now have a URL pointing to the interactive webpage generated by this tutorial:\n",
697
+ "\n",
698
+ "```\n",
699
+ "{username}.github.io/nbinteract-tutorial/monty.html\n",
700
+ "```\n",
701
+ "\n",
702
+ "Where `{username}` is replaced with your GitHub username. For example, if my\n",
703
+ "username is `SamLau95`, my URL is:\n",
704
+ "\n",
705
+ "```\n",
706
+ "SamLau95.github.io/nbinteract-tutorial/monty.html\n",
707
+ "```"
708
+ ]
709
+ }
710
+ ],
711
+ "metadata": {
712
+ "kernelspec": {
713
+ "display_name": "Python 3",
714
+ "language": "python",
715
+ "name": "python3"
716
+ },
717
+ "language_info": {
718
+ "codemirror_mode": {
719
+ "name": "ipython",
720
+ "version": 3
721
+ },
722
+ "file_extension": ".py",
723
+ "mimetype": "text/x-python",
724
+ "name": "python",
725
+ "nbconvert_exporter": "python",
726
+ "pygments_lexer": "ipython3",
727
+ "version": "3.7.9"
728
+ }
729
+ },
730
+ "nbformat": 4,
731
+ "nbformat_minor": 2
732
+ }