j1-template 2022.2.2 → 2022.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_includes/themes/j1/blocks/footer/boxes/contacts_box.proc +46 -18
- data/_includes/themes/j1/blocks/footer/boxes/links_box.proc +1 -0
- data/assets/data/fab.html +2 -2
- data/assets/data/footer.html +2 -2
- data/assets/themes/j1/core/css/themes/unolight/bootstrap.css +64 -206
- data/assets/themes/j1/core/css/themes/unolight/bootstrap.min.css +2 -2
- data/assets/themes/j1/modules/nbInteract/README.md +169 -0
- data/assets/themes/j1/modules/nbInteract/css/nbinteract-core.css +4 -0
- data/assets/themes/j1/modules/nbInteract/css/nbinteract-core.min.css +4 -0
- data/lib/j1/version.rb +1 -1
- data/lib/starter_web/Gemfile +1 -1
- data/lib/starter_web/_config.yml +1 -1
- data/lib/starter_web/_data/blocks/defaults/footer.yml +25 -17
- data/lib/starter_web/_data/blocks/footer.yml +78 -65
- data/lib/starter_web/_data/resources.yml +0 -22
- data/lib/starter_web/_includes/attributes.asciidoc +14 -0
- data/lib/starter_web/_plugins/lunr_index.rb +1 -1
- data/lib/starter_web/assets/images/pages/nbinteract/nbi-textbook-example.jpg +0 -0
- data/lib/starter_web/package.json +1 -1
- data/lib/starter_web/pages/public/jupyter/docs/_includes/documents/j1_docs_example_static.asciidoc +232 -232
- data/lib/starter_web/pages/public/jupyter/docs/j1-nbinteract-doc.adoc +135 -134
- data/lib/starter_web/pages/public/jupyter/docs/nbi-widget-manual.adoc +2 -4
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/j1_interactive_widgets-checkpoint.ipynb +170 -15
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/j1_interactive_widgets.ipynb +170 -15
- 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/nbi_docs_recipes_interactive_questions.ipynb +19 -22
- data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/binder-launches.html +670 -546
- data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_docs_example_dynamic.html +186 -186
- data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_interactive_widgets.html +919 -702
- data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_ode_selected.html +186 -186
- data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/nbi_docs_recipes_interactive_questions.html +242 -243
- data/lib/starter_web/pages/public/jupyter/{apis/binderhub-api.adoc → services/binderhub.adoc} +22 -25
- data/lib/starter_web/pages/public/jupyter/{apis/jupyterhub-api.adoc → services/jupyterhub.adoc} +2 -2
- data/lib/starter_web/pages/public/learn/roundtrip/300_icon_fonts.adoc +11 -0
- data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
- data/lib/starter_web/utilsrv/package.json +1 -1
- metadata +7 -28
- data/lib/starter_web/_data/_resources.yml +0 -1668
- data/lib/starter_web/assets/images/pages/nbinteract/binderhub-architecture.png +0 -0
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/algebra_with_sympy-checkpoint.ipynb +0 -14488
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/climate-change-forecast-checkpoint.ipynb +0 -916
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/ipympl_test_plots-checkpoint.ipynb +0 -14517
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/j1_algebra_with_sympy-checkpoint.ipynb +0 -14517
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/j1_altair_interactive-checkpoint.ipynb +0 -16493
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/j1_altair_visualization-checkpoint.ipynb +0 -15358
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/j1_altair_visualization_full-checkpoint.ipynb +0 -2576
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/j1_climate_change_forecast-checkpoint.ipynb +0 -1058
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/j1_climate_change_forecast.ipynb +0 -1060
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/j1_docs_example_dynamic-checkpoint.ipynb +0 -14478
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/j1_docs_hist-checkpoint.ipynb +0 -98
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/j1_interactive-checkpoint.ipynb +0 -560
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/j1_ipympl_test_plots-checkpoint.ipynb +0 -14511
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/j1_ode_selected-checkpoint.ipynb +0 -14478
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/j1_odes_in_python-checkpoint.ipynb +0 -14818
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/j1_pandas_creating_reading_and_writing-checkpoint.ipynb +0 -328
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/j1_recipes_layout-checkpoint.ipynb +0 -341
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/nbi_docs_recipes_graphing-checkpoint.ipynb +0 -98
- data/lib/starter_web/pages/public/jupyter/notebooks/nbi-docs/.ipynb_checkpoints/nbi_docs_examples_correlation-checkpoint.ipynb +0 -651
- data/lib/starter_web/pages/public/jupyter/notebooks/nbi-docs/.ipynb_checkpoints/nbi_docs_examples_variability_of_the_sample_mean-checkpoint.ipynb +0 -323
- data/lib/starter_web/pages/public/jupyter/notebooks/nbi-docs/.ipynb_checkpoints/nbi_docs_recipes_graphing-checkpoint.ipynb +0 -387
- data/lib/starter_web/pages/public/jupyter/notebooks/nbi-docs/.ipynb_checkpoints/nbi_docs_recipes_layout-checkpoint.ipynb +0 -384
@@ -1,186 +1,186 @@
|
|
1
|
-
<div class="cell text_cell">
|
2
|
-
<button class="js-nbinteract-widget">
|
3
|
-
Loading widgets...
|
4
|
-
</button>
|
5
|
-
</div>
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
|
10
|
-
<div class="text_cell_render border-box-sizing rendered_html">
|
11
|
-
<h4 id="Resources">Resources<a class="anchor-link" href="#Resources">¶</a></h4>
|
12
|
-
</div>
|
13
|
-
</div>
|
14
|
-
</div>
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
<div class="
|
19
|
-
cell border-box-sizing code_cell rendered">
|
20
|
-
<div class="input">
|
21
|
-
|
22
|
-
<div class="inner_cell">
|
23
|
-
<div class="input_area">
|
24
|
-
<div class=" highlight hl-ipython3"><pre><span></span><span class="kn">import</span> <span class="nn">warnings</span>
|
25
|
-
<span class="n">warnings</span><span class="o">.</span><span class="n">filterwarnings</span><span class="p">(</span><span class="s2">"ignore"</span><span class="p">)</span>
|
26
|
-
|
27
|
-
<span class="c1">### General Purpose</span>
|
28
|
-
<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
|
29
|
-
<span class="kn">from</span> <span class="nn">matplotlib</span> <span class="kn">import</span> <span class="n">pyplot</span> <span class="k">as</span> <span class="n">plt</span>
|
30
|
-
<span class="kn">from</span> <span class="nn">scipy.integrate</span> <span class="kn">import</span> <span class="n">odeint</span>
|
31
|
-
|
32
|
-
<span class="c1">### Jupyter Specifics</span>
|
33
|
-
<span class="kn">from</span> <span class="nn">IPython.display</span> <span class="kn">import</span> <span class="n">HTML</span>
|
34
|
-
<span class="kn">from</span> <span class="nn">ipywidgets.widgets</span> <span class="kn">import</span> <span class="n">interact</span><span class="p">,</span> <span class="n">IntSlider</span><span class="p">,</span> <span class="n">FloatSlider</span><span class="p">,</span> <span class="n">Layout</span>
|
35
|
-
|
36
|
-
<span class="o">%</span><span class="k">matplotlib</span> inline
|
37
|
-
|
38
|
-
<span class="n">style</span> <span class="o">=</span> <span class="p">{</span><span class="s1">'description_width'</span><span class="p">:</span> <span class="s1">'150px'</span><span class="p">}</span>
|
39
|
-
<span class="n">slider_layout</span> <span class="o">=</span> <span class="n">Layout</span><span class="p">(</span><span class="n">width</span><span class="o">=</span><span class="s1">'99%'</span><span class="p">)</span>
|
40
|
-
</pre></div>
|
41
|
-
|
42
|
-
</div>
|
43
|
-
</div>
|
44
|
-
</div>
|
45
|
-
|
46
|
-
</div>
|
47
|
-
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
|
48
|
-
<div class="text_cell_render border-box-sizing rendered_html">
|
49
|
-
<h4 id="Calculation">Calculation<a class="anchor-link" href="#Calculation">¶</a></h4>
|
50
|
-
</div>
|
51
|
-
</div>
|
52
|
-
</div>
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
<div class="
|
57
|
-
cell border-box-sizing code_cell rendered">
|
58
|
-
<div class="input">
|
59
|
-
|
60
|
-
<div class="inner_cell">
|
61
|
-
<div class="input_area">
|
62
|
-
<div class=" highlight hl-ipython3"><pre><span></span><span class="k">def</span> <span class="nf">main</span><span class="p">(</span><span class="n">rabbits_birthrate</span><span class="p">,</span> <span class="n">rabbits_deathrate</span><span class="p">,</span> <span class="n">foxes_birthrate</span><span class="p">,</span>
|
63
|
-
<span class="n">foxes_deathrate</span><span class="p">,</span> <span class="n">initial_rabbits</span><span class="p">,</span> <span class="n">foxes_inicial</span><span class="p">,</span> <span class="n">days</span><span class="p">):</span>
|
64
|
-
|
65
|
-
<span class="k">def</span> <span class="nf">function</span><span class="p">(</span><span class="n">s</span><span class="p">,</span> <span class="n">t</span><span class="p">):</span>
|
66
|
-
<span class="n">x</span><span class="p">,</span> <span class="n">y</span> <span class="o">=</span> <span class="n">s</span>
|
67
|
-
<span class="n">dydt</span> <span class="o">=</span> <span class="p">[</span>
|
68
|
-
<span class="n">rabbits_birthrate</span> <span class="o">*</span> <span class="n">x</span> <span class="o">-</span> <span class="n">rabbits_deathrate</span> <span class="o">*</span> <span class="n">x</span> <span class="o">*</span> <span class="n">y</span><span class="p">,</span> <span class="c1"># dx/dy -> Change in Rabbits</span>
|
69
|
-
<span class="n">foxes_birthrate</span> <span class="o">*</span> <span class="n">x</span> <span class="o">*</span> <span class="n">y</span> <span class="o">-</span> <span class="n">foxes_deathrate</span> <span class="o">*</span> <span class="n">y</span> <span class="c1"># dy/dt -> Change in Foxes</span>
|
70
|
-
<span class="p">]</span>
|
71
|
-
|
72
|
-
<span class="k">return</span> <span class="n">dydt</span>
|
73
|
-
|
74
|
-
<span class="n">time</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">days</span><span class="p">,</span> <span class="mf">0.01</span><span class="p">)</span>
|
75
|
-
<span class="n">initial_conditions</span> <span class="o">=</span> <span class="p">[</span><span class="n">initial_rabbits</span><span class="p">,</span> <span class="n">foxes_inicial</span><span class="p">]</span>
|
76
|
-
<span class="n">solution</span> <span class="o">=</span> <span class="n">odeint</span><span class="p">(</span><span class="n">function</span><span class="p">,</span> <span class="n">initial_conditions</span><span class="p">,</span> <span class="n">time</span><span class="p">)</span>
|
77
|
-
|
78
|
-
<span class="c1">#Graphic details</span>
|
79
|
-
<span class="n">fig</span><span class="p">,</span> <span class="n">axes</span> <span class="o">=</span> <span class="n">plt</span><span class="o">.</span><span class="n">subplots</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="n">figsize</span><span class="o">=</span><span class="p">(</span><span class="mi">15</span><span class="p">,</span> <span class="mi">10</span><span class="p">))</span>
|
80
|
-
|
81
|
-
<span class="n">ax</span> <span class="o">=</span> <span class="n">axes</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
|
82
|
-
|
83
|
-
<span class="n">ax</span><span class="o">.</span><span class="n">plot</span><span class="p">(</span><span class="n">time</span><span class="p">,</span> <span class="n">solution</span><span class="p">[:,</span> <span class="mi">0</span><span class="p">],</span> <span class="n">label</span><span class="o">=</span><span class="s1">'Rabbits(t)'</span><span class="p">)</span>
|
84
|
-
<span class="n">ax</span><span class="o">.</span><span class="n">plot</span><span class="p">(</span><span class="n">time</span><span class="p">,</span> <span class="n">solution</span><span class="p">[:,</span> <span class="mi">1</span><span class="p">],</span> <span class="n">label</span><span class="o">=</span><span class="s1">'Foxes(t)'</span><span class="p">)</span>
|
85
|
-
|
86
|
-
<span class="k">if</span> <span class="n">days</span> <span class="o"><=</span> <span class="mi">30</span><span class="p">:</span>
|
87
|
-
<span class="n">step</span> <span class="o">=</span> <span class="mi">1</span>
|
88
|
-
<span class="n">rotation</span> <span class="o">=</span> <span class="s2">"horizontal"</span>
|
89
|
-
<span class="k">elif</span> <span class="n">days</span> <span class="o"><=</span> <span class="mi">150</span><span class="p">:</span>
|
90
|
-
<span class="n">step</span> <span class="o">=</span> <span class="mi">5</span>
|
91
|
-
<span class="n">rotation</span> <span class="o">=</span> <span class="s2">"vertical"</span>
|
92
|
-
<span class="k">else</span><span class="p">:</span>
|
93
|
-
<span class="n">step</span> <span class="o">=</span> <span class="mi">10</span>
|
94
|
-
<span class="n">rotation</span> <span class="o">=</span> <span class="s2">"vertical"</span>
|
95
|
-
|
96
|
-
<span class="n">ax</span><span class="o">.</span><span class="n">set_xticklabels</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">days</span> <span class="o">+</span> <span class="mi">1</span><span class="p">,</span> <span class="n">step</span><span class="p">,</span> <span class="n">dtype</span><span class="o">=</span><span class="nb">int</span><span class="p">),</span> <span class="n">rotation</span><span class="o">=</span><span class="n">rotation</span><span class="p">)</span>
|
97
|
-
<span class="n">ax</span><span class="o">.</span><span class="n">set_xticks</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">days</span> <span class="o">+</span> <span class="mi">1</span><span class="p">,</span> <span class="n">step</span><span class="p">))</span>
|
98
|
-
|
99
|
-
<span class="n">ax</span><span class="o">.</span><span class="n">set_xlim</span><span class="p">([</span><span class="mi">0</span><span class="p">,</span> <span class="n">days</span><span class="p">])</span>
|
100
|
-
<span class="n">ax</span><span class="o">.</span><span class="n">set_ylim</span><span class="p">([</span><span class="mi">0</span><span class="p">,</span> <span class="nb">max</span><span class="p">(</span><span class="nb">max</span><span class="p">(</span><span class="n">solution</span><span class="p">[:,</span> <span class="mi">0</span><span class="p">]),</span> <span class="nb">max</span><span class="p">(</span><span class="n">solution</span><span class="p">[:,</span> <span class="mi">1</span><span class="p">]))</span> <span class="o">*</span> <span class="mf">1.05</span><span class="p">])</span>
|
101
|
-
<span class="n">ax</span><span class="o">.</span><span class="n">set_xlabel</span><span class="p">(</span><span class="s1">'Time'</span><span class="p">)</span>
|
102
|
-
<span class="n">ax</span><span class="o">.</span><span class="n">set_ylabel</span><span class="p">(</span><span class="s1">'Population'</span><span class="p">)</span>
|
103
|
-
<span class="n">ax</span><span class="o">.</span><span class="n">legend</span><span class="p">(</span><span class="n">loc</span><span class="o">=</span><span class="s1">'best'</span><span class="p">)</span>
|
104
|
-
<span class="n">ax</span><span class="o">.</span><span class="n">grid</span><span class="p">()</span>
|
105
|
-
|
106
|
-
|
107
|
-
<span class="n">ax</span> <span class="o">=</span> <span class="n">axes</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span>
|
108
|
-
|
109
|
-
<span class="n">ax</span><span class="o">.</span><span class="n">plot</span><span class="p">(</span><span class="n">solution</span><span class="p">[:,</span> <span class="mi">0</span><span class="p">],</span> <span class="n">solution</span><span class="p">[:,</span> <span class="mi">1</span><span class="p">],</span> <span class="n">label</span><span class="o">=</span><span class="s1">'Foxes vs Rabbits'</span><span class="p">)</span>
|
110
|
-
|
111
|
-
<span class="n">ax</span><span class="o">.</span><span class="n">set_xlim</span><span class="p">([</span><span class="mi">0</span><span class="p">,</span> <span class="nb">max</span><span class="p">(</span><span class="n">solution</span><span class="p">[:,</span> <span class="mi">0</span><span class="p">])</span> <span class="o">*</span> <span class="mf">1.05</span><span class="p">])</span>
|
112
|
-
<span class="n">ax</span><span class="o">.</span><span class="n">set_ylim</span><span class="p">([</span><span class="mi">0</span><span class="p">,</span> <span class="nb">max</span><span class="p">(</span><span class="n">solution</span><span class="p">[:,</span> <span class="mi">1</span><span class="p">])</span> <span class="o">*</span> <span class="mf">1.05</span><span class="p">])</span>
|
113
|
-
<span class="n">ax</span><span class="o">.</span><span class="n">set_xlabel</span><span class="p">(</span><span class="s1">'Rabbits'</span><span class="p">)</span>
|
114
|
-
<span class="n">ax</span><span class="o">.</span><span class="n">set_ylabel</span><span class="p">(</span><span class="s1">'Foxes'</span><span class="p">)</span>
|
115
|
-
<span class="n">ax</span><span class="o">.</span><span class="n">legend</span><span class="p">(</span><span class="n">loc</span><span class="o">=</span><span class="s1">'best'</span><span class="p">)</span>
|
116
|
-
<span class="n">ax</span><span class="o">.</span><span class="n">grid</span><span class="p">()</span>
|
117
|
-
|
118
|
-
<span class="n">plt</span><span class="o">.</span><span class="n">tight_layout</span><span class="p">()</span>
|
119
|
-
<span class="n">plt</span><span class="o">.</span><span class="n">show</span><span class="p">()</span>
|
120
|
-
</pre></div>
|
121
|
-
|
122
|
-
</div>
|
123
|
-
</div>
|
124
|
-
</div>
|
125
|
-
|
126
|
-
</div>
|
127
|
-
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
|
128
|
-
<div class="text_cell_render border-box-sizing rendered_html">
|
129
|
-
<h4 id="Evaluation">Evaluation<a class="anchor-link" href="#Evaluation">¶</a></h4>
|
130
|
-
</div>
|
131
|
-
</div>
|
132
|
-
</div>
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
<div class="
|
137
|
-
cell border-box-sizing code_cell rendered">
|
138
|
-
<div class="input">
|
139
|
-
|
140
|
-
<div class="inner_cell">
|
141
|
-
<div class="input_area">
|
142
|
-
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">interact</span><span class="p">(</span><span class="n">main</span><span class="p">,</span>
|
143
|
-
<span class="n">rabbits_birthrate</span><span class="o">=</span><span class="n">FloatSlider</span><span class="p">(</span><span class="nb">min</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="nb">max</span><span class="o">=</span><span class="mi">25</span><span class="p">,</span> <span class="n">step</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">value</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span>
|
144
|
-
<span class="n">description</span><span class="o">=</span><span class="s1">'Birth Rate/Rabbits'</span><span class="p">,</span> <span class="n">style</span><span class="o">=</span><span class="n">style</span><span class="p">,</span> <span class="n">layout</span><span class="o">=</span><span class="n">slider_layout</span><span class="p">),</span>
|
145
|
-
<span class="n">rabbits_deathrate</span><span class="o">=</span><span class="n">FloatSlider</span><span class="p">(</span><span class="nb">min</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="nb">max</span><span class="o">=</span><span class="mi">25</span><span class="p">,</span> <span class="n">step</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">value</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span>
|
146
|
-
<span class="n">description</span><span class="o">=</span><span class="s1">'Death Rate/Rabbits'</span><span class="p">,</span> <span class="n">style</span><span class="o">=</span><span class="n">style</span><span class="p">,</span> <span class="n">layout</span><span class="o">=</span><span class="n">slider_layout</span><span class="p">),</span>
|
147
|
-
<span class="n">foxes_birthrate</span><span class="o">=</span><span class="n">FloatSlider</span><span class="p">(</span><span class="nb">min</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="nb">max</span><span class="o">=</span><span class="mi">25</span><span class="p">,</span> <span class="n">step</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">value</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span>
|
148
|
-
<span class="n">description</span><span class="o">=</span><span class="s1">'Birth Rate/Foxes'</span><span class="p">,</span> <span class="n">style</span><span class="o">=</span><span class="n">style</span><span class="p">,</span> <span class="n">layout</span><span class="o">=</span><span class="n">slider_layout</span><span class="p">),</span>
|
149
|
-
<span class="n">foxes_deathrate</span><span class="o">=</span><span class="n">FloatSlider</span><span class="p">(</span><span class="nb">min</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="nb">max</span><span class="o">=</span><span class="mi">25</span><span class="p">,</span> <span class="n">step</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">value</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span>
|
150
|
-
<span class="n">description</span><span class="o">=</span><span class="s1">'Death Rate/Foxes'</span><span class="p">,</span> <span class="n">style</span><span class="o">=</span><span class="n">style</span><span class="p">,</span> <span class="n">layout</span><span class="o">=</span><span class="n">slider_layout</span><span class="p">),</span>
|
151
|
-
<span class="n">initial_rabbits</span><span class="o">=</span><span class="n">FloatSlider</span><span class="p">(</span><span class="nb">min</span><span class="o">=</span><span class="mi">2</span> <span class="p">,</span> <span class="nb">max</span><span class="o">=</span><span class="mi">100</span><span class="p">,</span> <span class="n">step</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">value</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span>
|
152
|
-
<span class="n">description</span><span class="o">=</span><span class="s1">'Initial Rabbits'</span><span class="p">,</span> <span class="n">style</span><span class="o">=</span><span class="n">style</span><span class="p">,</span> <span class="n">layout</span><span class="o">=</span><span class="n">slider_layout</span><span class="p">),</span>
|
153
|
-
<span class="n">foxes_inicial</span><span class="o">=</span><span class="n">FloatSlider</span><span class="p">(</span><span class="nb">min</span><span class="o">=</span><span class="mi">1</span> <span class="p">,</span> <span class="nb">max</span><span class="o">=</span><span class="mi">100</span><span class="p">,</span> <span class="n">step</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">value</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span>
|
154
|
-
<span class="n">description</span><span class="o">=</span><span class="s1">'Initial Foxes'</span><span class="p">,</span> <span class="n">style</span><span class="o">=</span><span class="n">style</span><span class="p">,</span> <span class="n">layout</span><span class="o">=</span><span class="n">slider_layout</span><span class="p">),</span>
|
155
|
-
<span class="n">days</span><span class="o">=</span><span class="n">FloatSlider</span><span class="p">(</span><span class="nb">min</span><span class="o">=</span><span class="mi">15</span><span class="p">,</span> <span class="nb">max</span><span class="o">=</span><span class="mi">365</span> <span class="p">,</span> <span class="n">step</span><span class="o">=</span><span class="mi">10</span><span class="p">,</span> <span class="n">value</span><span class="o">=</span><span class="mi">15</span><span class="p">,</span>
|
156
|
-
<span class="n">description</span><span class="o">=</span><span class="s1">'Number of Days'</span><span class="p">,</span> <span class="n">style</span><span class="o">=</span><span class="n">style</span><span class="p">,</span> <span class="n">layout</span><span class="o">=</span><span class="n">slider_layout</span><span class="p">),</span>
|
157
|
-
<span class="p">);</span>
|
158
|
-
</pre></div>
|
159
|
-
|
160
|
-
</div>
|
161
|
-
</div>
|
162
|
-
</div>
|
163
|
-
|
164
|
-
<div class="output_wrapper">
|
165
|
-
<div class="output">
|
166
|
-
|
167
|
-
|
168
|
-
<div class="output_area">
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
<div class="output_subarea output_widget_view ">
|
175
|
-
<button class="js-nbinteract-widget">
|
176
|
-
Loading widgets...
|
177
|
-
</button>
|
178
|
-
</div>
|
179
|
-
|
180
|
-
</div>
|
181
|
-
|
182
|
-
</div>
|
183
|
-
</div>
|
184
|
-
|
185
|
-
</div>
|
186
|
-
|
1
|
+
<div class="cell text_cell">
|
2
|
+
<button class="js-nbinteract-widget">
|
3
|
+
Loading widgets...
|
4
|
+
</button>
|
5
|
+
</div>
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
|
10
|
+
<div class="text_cell_render border-box-sizing rendered_html">
|
11
|
+
<h4 id="Resources">Resources<a class="anchor-link" href="#Resources">¶</a></h4>
|
12
|
+
</div>
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
|
16
|
+
|
17
|
+
|
18
|
+
<div class="
|
19
|
+
cell border-box-sizing code_cell rendered">
|
20
|
+
<div class="input">
|
21
|
+
|
22
|
+
<div class="inner_cell">
|
23
|
+
<div class="input_area">
|
24
|
+
<div class=" highlight hl-ipython3"><pre><span></span><span class="kn">import</span> <span class="nn">warnings</span>
|
25
|
+
<span class="n">warnings</span><span class="o">.</span><span class="n">filterwarnings</span><span class="p">(</span><span class="s2">"ignore"</span><span class="p">)</span>
|
26
|
+
|
27
|
+
<span class="c1">### General Purpose</span>
|
28
|
+
<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
|
29
|
+
<span class="kn">from</span> <span class="nn">matplotlib</span> <span class="kn">import</span> <span class="n">pyplot</span> <span class="k">as</span> <span class="n">plt</span>
|
30
|
+
<span class="kn">from</span> <span class="nn">scipy.integrate</span> <span class="kn">import</span> <span class="n">odeint</span>
|
31
|
+
|
32
|
+
<span class="c1">### Jupyter Specifics</span>
|
33
|
+
<span class="kn">from</span> <span class="nn">IPython.display</span> <span class="kn">import</span> <span class="n">HTML</span>
|
34
|
+
<span class="kn">from</span> <span class="nn">ipywidgets.widgets</span> <span class="kn">import</span> <span class="n">interact</span><span class="p">,</span> <span class="n">IntSlider</span><span class="p">,</span> <span class="n">FloatSlider</span><span class="p">,</span> <span class="n">Layout</span>
|
35
|
+
|
36
|
+
<span class="o">%</span><span class="k">matplotlib</span> inline
|
37
|
+
|
38
|
+
<span class="n">style</span> <span class="o">=</span> <span class="p">{</span><span class="s1">'description_width'</span><span class="p">:</span> <span class="s1">'150px'</span><span class="p">}</span>
|
39
|
+
<span class="n">slider_layout</span> <span class="o">=</span> <span class="n">Layout</span><span class="p">(</span><span class="n">width</span><span class="o">=</span><span class="s1">'99%'</span><span class="p">)</span>
|
40
|
+
</pre></div>
|
41
|
+
|
42
|
+
</div>
|
43
|
+
</div>
|
44
|
+
</div>
|
45
|
+
|
46
|
+
</div>
|
47
|
+
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
|
48
|
+
<div class="text_cell_render border-box-sizing rendered_html">
|
49
|
+
<h4 id="Calculation">Calculation<a class="anchor-link" href="#Calculation">¶</a></h4>
|
50
|
+
</div>
|
51
|
+
</div>
|
52
|
+
</div>
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
<div class="
|
57
|
+
cell border-box-sizing code_cell rendered">
|
58
|
+
<div class="input">
|
59
|
+
|
60
|
+
<div class="inner_cell">
|
61
|
+
<div class="input_area">
|
62
|
+
<div class=" highlight hl-ipython3"><pre><span></span><span class="k">def</span> <span class="nf">main</span><span class="p">(</span><span class="n">rabbits_birthrate</span><span class="p">,</span> <span class="n">rabbits_deathrate</span><span class="p">,</span> <span class="n">foxes_birthrate</span><span class="p">,</span>
|
63
|
+
<span class="n">foxes_deathrate</span><span class="p">,</span> <span class="n">initial_rabbits</span><span class="p">,</span> <span class="n">foxes_inicial</span><span class="p">,</span> <span class="n">days</span><span class="p">):</span>
|
64
|
+
|
65
|
+
<span class="k">def</span> <span class="nf">function</span><span class="p">(</span><span class="n">s</span><span class="p">,</span> <span class="n">t</span><span class="p">):</span>
|
66
|
+
<span class="n">x</span><span class="p">,</span> <span class="n">y</span> <span class="o">=</span> <span class="n">s</span>
|
67
|
+
<span class="n">dydt</span> <span class="o">=</span> <span class="p">[</span>
|
68
|
+
<span class="n">rabbits_birthrate</span> <span class="o">*</span> <span class="n">x</span> <span class="o">-</span> <span class="n">rabbits_deathrate</span> <span class="o">*</span> <span class="n">x</span> <span class="o">*</span> <span class="n">y</span><span class="p">,</span> <span class="c1"># dx/dy -> Change in Rabbits</span>
|
69
|
+
<span class="n">foxes_birthrate</span> <span class="o">*</span> <span class="n">x</span> <span class="o">*</span> <span class="n">y</span> <span class="o">-</span> <span class="n">foxes_deathrate</span> <span class="o">*</span> <span class="n">y</span> <span class="c1"># dy/dt -> Change in Foxes</span>
|
70
|
+
<span class="p">]</span>
|
71
|
+
|
72
|
+
<span class="k">return</span> <span class="n">dydt</span>
|
73
|
+
|
74
|
+
<span class="n">time</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">days</span><span class="p">,</span> <span class="mf">0.01</span><span class="p">)</span>
|
75
|
+
<span class="n">initial_conditions</span> <span class="o">=</span> <span class="p">[</span><span class="n">initial_rabbits</span><span class="p">,</span> <span class="n">foxes_inicial</span><span class="p">]</span>
|
76
|
+
<span class="n">solution</span> <span class="o">=</span> <span class="n">odeint</span><span class="p">(</span><span class="n">function</span><span class="p">,</span> <span class="n">initial_conditions</span><span class="p">,</span> <span class="n">time</span><span class="p">)</span>
|
77
|
+
|
78
|
+
<span class="c1">#Graphic details</span>
|
79
|
+
<span class="n">fig</span><span class="p">,</span> <span class="n">axes</span> <span class="o">=</span> <span class="n">plt</span><span class="o">.</span><span class="n">subplots</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="n">figsize</span><span class="o">=</span><span class="p">(</span><span class="mi">15</span><span class="p">,</span> <span class="mi">10</span><span class="p">))</span>
|
80
|
+
|
81
|
+
<span class="n">ax</span> <span class="o">=</span> <span class="n">axes</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
|
82
|
+
|
83
|
+
<span class="n">ax</span><span class="o">.</span><span class="n">plot</span><span class="p">(</span><span class="n">time</span><span class="p">,</span> <span class="n">solution</span><span class="p">[:,</span> <span class="mi">0</span><span class="p">],</span> <span class="n">label</span><span class="o">=</span><span class="s1">'Rabbits(t)'</span><span class="p">)</span>
|
84
|
+
<span class="n">ax</span><span class="o">.</span><span class="n">plot</span><span class="p">(</span><span class="n">time</span><span class="p">,</span> <span class="n">solution</span><span class="p">[:,</span> <span class="mi">1</span><span class="p">],</span> <span class="n">label</span><span class="o">=</span><span class="s1">'Foxes(t)'</span><span class="p">)</span>
|
85
|
+
|
86
|
+
<span class="k">if</span> <span class="n">days</span> <span class="o"><=</span> <span class="mi">30</span><span class="p">:</span>
|
87
|
+
<span class="n">step</span> <span class="o">=</span> <span class="mi">1</span>
|
88
|
+
<span class="n">rotation</span> <span class="o">=</span> <span class="s2">"horizontal"</span>
|
89
|
+
<span class="k">elif</span> <span class="n">days</span> <span class="o"><=</span> <span class="mi">150</span><span class="p">:</span>
|
90
|
+
<span class="n">step</span> <span class="o">=</span> <span class="mi">5</span>
|
91
|
+
<span class="n">rotation</span> <span class="o">=</span> <span class="s2">"vertical"</span>
|
92
|
+
<span class="k">else</span><span class="p">:</span>
|
93
|
+
<span class="n">step</span> <span class="o">=</span> <span class="mi">10</span>
|
94
|
+
<span class="n">rotation</span> <span class="o">=</span> <span class="s2">"vertical"</span>
|
95
|
+
|
96
|
+
<span class="n">ax</span><span class="o">.</span><span class="n">set_xticklabels</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">days</span> <span class="o">+</span> <span class="mi">1</span><span class="p">,</span> <span class="n">step</span><span class="p">,</span> <span class="n">dtype</span><span class="o">=</span><span class="nb">int</span><span class="p">),</span> <span class="n">rotation</span><span class="o">=</span><span class="n">rotation</span><span class="p">)</span>
|
97
|
+
<span class="n">ax</span><span class="o">.</span><span class="n">set_xticks</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">days</span> <span class="o">+</span> <span class="mi">1</span><span class="p">,</span> <span class="n">step</span><span class="p">))</span>
|
98
|
+
|
99
|
+
<span class="n">ax</span><span class="o">.</span><span class="n">set_xlim</span><span class="p">([</span><span class="mi">0</span><span class="p">,</span> <span class="n">days</span><span class="p">])</span>
|
100
|
+
<span class="n">ax</span><span class="o">.</span><span class="n">set_ylim</span><span class="p">([</span><span class="mi">0</span><span class="p">,</span> <span class="nb">max</span><span class="p">(</span><span class="nb">max</span><span class="p">(</span><span class="n">solution</span><span class="p">[:,</span> <span class="mi">0</span><span class="p">]),</span> <span class="nb">max</span><span class="p">(</span><span class="n">solution</span><span class="p">[:,</span> <span class="mi">1</span><span class="p">]))</span> <span class="o">*</span> <span class="mf">1.05</span><span class="p">])</span>
|
101
|
+
<span class="n">ax</span><span class="o">.</span><span class="n">set_xlabel</span><span class="p">(</span><span class="s1">'Time'</span><span class="p">)</span>
|
102
|
+
<span class="n">ax</span><span class="o">.</span><span class="n">set_ylabel</span><span class="p">(</span><span class="s1">'Population'</span><span class="p">)</span>
|
103
|
+
<span class="n">ax</span><span class="o">.</span><span class="n">legend</span><span class="p">(</span><span class="n">loc</span><span class="o">=</span><span class="s1">'best'</span><span class="p">)</span>
|
104
|
+
<span class="n">ax</span><span class="o">.</span><span class="n">grid</span><span class="p">()</span>
|
105
|
+
|
106
|
+
|
107
|
+
<span class="n">ax</span> <span class="o">=</span> <span class="n">axes</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span>
|
108
|
+
|
109
|
+
<span class="n">ax</span><span class="o">.</span><span class="n">plot</span><span class="p">(</span><span class="n">solution</span><span class="p">[:,</span> <span class="mi">0</span><span class="p">],</span> <span class="n">solution</span><span class="p">[:,</span> <span class="mi">1</span><span class="p">],</span> <span class="n">label</span><span class="o">=</span><span class="s1">'Foxes vs Rabbits'</span><span class="p">)</span>
|
110
|
+
|
111
|
+
<span class="n">ax</span><span class="o">.</span><span class="n">set_xlim</span><span class="p">([</span><span class="mi">0</span><span class="p">,</span> <span class="nb">max</span><span class="p">(</span><span class="n">solution</span><span class="p">[:,</span> <span class="mi">0</span><span class="p">])</span> <span class="o">*</span> <span class="mf">1.05</span><span class="p">])</span>
|
112
|
+
<span class="n">ax</span><span class="o">.</span><span class="n">set_ylim</span><span class="p">([</span><span class="mi">0</span><span class="p">,</span> <span class="nb">max</span><span class="p">(</span><span class="n">solution</span><span class="p">[:,</span> <span class="mi">1</span><span class="p">])</span> <span class="o">*</span> <span class="mf">1.05</span><span class="p">])</span>
|
113
|
+
<span class="n">ax</span><span class="o">.</span><span class="n">set_xlabel</span><span class="p">(</span><span class="s1">'Rabbits'</span><span class="p">)</span>
|
114
|
+
<span class="n">ax</span><span class="o">.</span><span class="n">set_ylabel</span><span class="p">(</span><span class="s1">'Foxes'</span><span class="p">)</span>
|
115
|
+
<span class="n">ax</span><span class="o">.</span><span class="n">legend</span><span class="p">(</span><span class="n">loc</span><span class="o">=</span><span class="s1">'best'</span><span class="p">)</span>
|
116
|
+
<span class="n">ax</span><span class="o">.</span><span class="n">grid</span><span class="p">()</span>
|
117
|
+
|
118
|
+
<span class="n">plt</span><span class="o">.</span><span class="n">tight_layout</span><span class="p">()</span>
|
119
|
+
<span class="n">plt</span><span class="o">.</span><span class="n">show</span><span class="p">()</span>
|
120
|
+
</pre></div>
|
121
|
+
|
122
|
+
</div>
|
123
|
+
</div>
|
124
|
+
</div>
|
125
|
+
|
126
|
+
</div>
|
127
|
+
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
|
128
|
+
<div class="text_cell_render border-box-sizing rendered_html">
|
129
|
+
<h4 id="Evaluation">Evaluation<a class="anchor-link" href="#Evaluation">¶</a></h4>
|
130
|
+
</div>
|
131
|
+
</div>
|
132
|
+
</div>
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
<div class="
|
137
|
+
cell border-box-sizing code_cell rendered">
|
138
|
+
<div class="input">
|
139
|
+
|
140
|
+
<div class="inner_cell">
|
141
|
+
<div class="input_area">
|
142
|
+
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">interact</span><span class="p">(</span><span class="n">main</span><span class="p">,</span>
|
143
|
+
<span class="n">rabbits_birthrate</span><span class="o">=</span><span class="n">FloatSlider</span><span class="p">(</span><span class="nb">min</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="nb">max</span><span class="o">=</span><span class="mi">25</span><span class="p">,</span> <span class="n">step</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">value</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span>
|
144
|
+
<span class="n">description</span><span class="o">=</span><span class="s1">'Birth Rate/Rabbits'</span><span class="p">,</span> <span class="n">style</span><span class="o">=</span><span class="n">style</span><span class="p">,</span> <span class="n">layout</span><span class="o">=</span><span class="n">slider_layout</span><span class="p">),</span>
|
145
|
+
<span class="n">rabbits_deathrate</span><span class="o">=</span><span class="n">FloatSlider</span><span class="p">(</span><span class="nb">min</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="nb">max</span><span class="o">=</span><span class="mi">25</span><span class="p">,</span> <span class="n">step</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">value</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span>
|
146
|
+
<span class="n">description</span><span class="o">=</span><span class="s1">'Death Rate/Rabbits'</span><span class="p">,</span> <span class="n">style</span><span class="o">=</span><span class="n">style</span><span class="p">,</span> <span class="n">layout</span><span class="o">=</span><span class="n">slider_layout</span><span class="p">),</span>
|
147
|
+
<span class="n">foxes_birthrate</span><span class="o">=</span><span class="n">FloatSlider</span><span class="p">(</span><span class="nb">min</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="nb">max</span><span class="o">=</span><span class="mi">25</span><span class="p">,</span> <span class="n">step</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">value</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span>
|
148
|
+
<span class="n">description</span><span class="o">=</span><span class="s1">'Birth Rate/Foxes'</span><span class="p">,</span> <span class="n">style</span><span class="o">=</span><span class="n">style</span><span class="p">,</span> <span class="n">layout</span><span class="o">=</span><span class="n">slider_layout</span><span class="p">),</span>
|
149
|
+
<span class="n">foxes_deathrate</span><span class="o">=</span><span class="n">FloatSlider</span><span class="p">(</span><span class="nb">min</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="nb">max</span><span class="o">=</span><span class="mi">25</span><span class="p">,</span> <span class="n">step</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">value</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span>
|
150
|
+
<span class="n">description</span><span class="o">=</span><span class="s1">'Death Rate/Foxes'</span><span class="p">,</span> <span class="n">style</span><span class="o">=</span><span class="n">style</span><span class="p">,</span> <span class="n">layout</span><span class="o">=</span><span class="n">slider_layout</span><span class="p">),</span>
|
151
|
+
<span class="n">initial_rabbits</span><span class="o">=</span><span class="n">FloatSlider</span><span class="p">(</span><span class="nb">min</span><span class="o">=</span><span class="mi">2</span> <span class="p">,</span> <span class="nb">max</span><span class="o">=</span><span class="mi">100</span><span class="p">,</span> <span class="n">step</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">value</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span>
|
152
|
+
<span class="n">description</span><span class="o">=</span><span class="s1">'Initial Rabbits'</span><span class="p">,</span> <span class="n">style</span><span class="o">=</span><span class="n">style</span><span class="p">,</span> <span class="n">layout</span><span class="o">=</span><span class="n">slider_layout</span><span class="p">),</span>
|
153
|
+
<span class="n">foxes_inicial</span><span class="o">=</span><span class="n">FloatSlider</span><span class="p">(</span><span class="nb">min</span><span class="o">=</span><span class="mi">1</span> <span class="p">,</span> <span class="nb">max</span><span class="o">=</span><span class="mi">100</span><span class="p">,</span> <span class="n">step</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">value</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span>
|
154
|
+
<span class="n">description</span><span class="o">=</span><span class="s1">'Initial Foxes'</span><span class="p">,</span> <span class="n">style</span><span class="o">=</span><span class="n">style</span><span class="p">,</span> <span class="n">layout</span><span class="o">=</span><span class="n">slider_layout</span><span class="p">),</span>
|
155
|
+
<span class="n">days</span><span class="o">=</span><span class="n">FloatSlider</span><span class="p">(</span><span class="nb">min</span><span class="o">=</span><span class="mi">15</span><span class="p">,</span> <span class="nb">max</span><span class="o">=</span><span class="mi">365</span> <span class="p">,</span> <span class="n">step</span><span class="o">=</span><span class="mi">10</span><span class="p">,</span> <span class="n">value</span><span class="o">=</span><span class="mi">15</span><span class="p">,</span>
|
156
|
+
<span class="n">description</span><span class="o">=</span><span class="s1">'Number of Days'</span><span class="p">,</span> <span class="n">style</span><span class="o">=</span><span class="n">style</span><span class="p">,</span> <span class="n">layout</span><span class="o">=</span><span class="n">slider_layout</span><span class="p">),</span>
|
157
|
+
<span class="p">);</span>
|
158
|
+
</pre></div>
|
159
|
+
|
160
|
+
</div>
|
161
|
+
</div>
|
162
|
+
</div>
|
163
|
+
|
164
|
+
<div class="output_wrapper">
|
165
|
+
<div class="output">
|
166
|
+
|
167
|
+
|
168
|
+
<div class="output_area">
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
<div class="output_subarea output_widget_view ">
|
175
|
+
<button class="js-nbinteract-widget">
|
176
|
+
Loading widgets...
|
177
|
+
</button>
|
178
|
+
</div>
|
179
|
+
|
180
|
+
</div>
|
181
|
+
|
182
|
+
</div>
|
183
|
+
</div>
|
184
|
+
|
185
|
+
</div>
|
186
|
+
|