Skip to content

Commit

Permalink
Built site for gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinheavey committed Oct 19, 2023
1 parent 73a347e commit 292c39d
Show file tree
Hide file tree
Showing 38 changed files with 752 additions and 727 deletions.
2 changes: 1 addition & 1 deletion .nojekyll
Original file line number Diff line number Diff line change
@@ -1 +1 @@
d0449cbc
255ed74a
9 changes: 5 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -249,13 +249,14 @@ <h2 class="anchored" data-anchor-id="running-the-code-yourself">Running the code
<p>You can install the exact packages that the book uses with the <a href="https://github.com/kevinheavey/modern-polars/blob/master/env.yml">env.yml</a> file:</p>
<pre class="shell"><code>mamba env create -f env.yml</code></pre>
<p>If you’re not using mamba/conda you can install the following package versions and it should work:</p>
<pre><code>polars: 0.15.13
<pre><code>polars: 0.19.9
pyarrow: 10.0.1
pandas: 1.5.2
pandas: 2.1.1
numpy: 1.23.5
fsspec: 2022.11.0
matplotlib: 3.6.2
seaborn: 0.12.1
matplotlib: 3.8.0
seaborn: 0.13.0
statsmodels: 0.14.0
filprofiler: 2022.11.0</code></pre>
<section id="data" class="level3">
<h3 class="anchored" data-anchor-id="data">Data</h3>
Expand Down
17 changes: 12 additions & 5 deletions indexing.html

Large diffs are not rendered by default.

133 changes: 69 additions & 64 deletions method_chaining.html

Large diffs are not rendered by default.

Binary file modified method_chaining_files/figure-html/cell-10-output-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified method_chaining_files/figure-html/cell-12-output-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified method_chaining_files/figure-html/cell-14-output-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified method_chaining_files/figure-html/cell-15-output-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
219 changes: 112 additions & 107 deletions performance.html

Large diffs are not rendered by default.

393 changes: 201 additions & 192 deletions scaling.html

Large diffs are not rendered by default.

Binary file modified scaling_files/figure-html/cell-18-output-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified scaling_files/figure-html/cell-19-output-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified scaling_files/figure-html/cell-20-output-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added scaling_files/figure-html/cell-21-output-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified scaling_files/figure-html/cell-28-output-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified scaling_files/figure-html/cell-29-output-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 22 additions & 22 deletions search.json

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions summary.html
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ <h2 id="toc-title">Table of contents</h2>
<li><a href="#reasons-to-use-polars" id="toc-reasons-to-use-polars" class="nav-link active" data-scroll-target="#reasons-to-use-polars">Reasons to use Polars</a></li>
<li><a href="#reasons-not-to-use-polars" id="toc-reasons-not-to-use-polars" class="nav-link" data-scroll-target="#reasons-not-to-use-polars">Reasons not to use Polars</a>
<ul class="collapse">
<li><a href="#bugs" id="toc-bugs" class="nav-link" data-scroll-target="#bugs">Bugs</a></li>
<li><a href="#bugs-maybe" id="toc-bugs-maybe" class="nav-link" data-scroll-target="#bugs-maybe">Bugs (maybe)</a></li>
<li><a href="#if-it-aint-broke-dont-fix-it" id="toc-if-it-aint-broke-dont-fix-it" class="nav-link" data-scroll-target="#if-it-aint-broke-dont-fix-it">If it ain’t broke, don’t fix it</a></li>
<li><a href="#api-stability" id="toc-api-stability" class="nav-link" data-scroll-target="#api-stability">API stability</a></li>
</ul></li>
Expand Down Expand Up @@ -219,9 +219,10 @@ <h2 class="anchored" data-anchor-id="reasons-to-use-polars">Reasons to use Polar
</section>
<section id="reasons-not-to-use-polars" class="level2">
<h2 class="anchored" data-anchor-id="reasons-not-to-use-polars">Reasons not to use Polars</h2>
<section id="bugs" class="level3">
<h3 class="anchored" data-anchor-id="bugs">Bugs</h3>
<p>By my count I ran into <a href="https://github.com/pola-rs/polars/issues?q=is%3Aissue+author%3Akevinheavey">11 bugs</a> while writing this book. They were fixed quickly and tests were added to make sure they don’t happen again, but it all makes me feel somewhat uneasy. It’s not like Pandas hasn’t gone through a whole insectarium of bugs, but Polars probably has more right now due to being newer.</p>
<section id="bugs-maybe" class="level3">
<h3 class="anchored" data-anchor-id="bugs-maybe">Bugs (maybe)</h3>
<p>By my count I ran into <a href="https://github.com/pola-rs/polars/issues?q=is%3Aissue+author%3Akevinheavey">11 bugs</a> while writing this book. They were fixed quickly and tests were added to make sure they don’t happen again, but it made me feel somewhat uneasy.</p>
<p>However that was some time ago, and Pandas also has plenty of bugs, so at this point it’s quite difficult to measure which library is buggier.</p>
</section>
<section id="if-it-aint-broke-dont-fix-it" class="level3">
<h3 class="anchored" data-anchor-id="if-it-aint-broke-dont-fix-it">If it ain’t broke, don’t fix it</h3>
Expand Down
641 changes: 316 additions & 325 deletions tidy.html

Large diffs are not rendered by default.

Binary file modified tidy_files/figure-html/cell-12-output-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tidy_files/figure-html/cell-13-output-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tidy_files/figure-html/cell-14-output-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tidy_files/figure-html/cell-15-output-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tidy_files/figure-html/cell-16-output-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tidy_files/figure-html/cell-21-output-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tidy_files/figure-html/cell-22-output-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tidy_files/figure-html/cell-25-output-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tidy_files/figure-html/cell-26-output-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tidy_files/figure-html/cell-29-output-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tidy_files/figure-html/cell-30-output-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tidy_files/figure-html/cell-31-output-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 9 additions & 3 deletions timeseries.html
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ <h2 data-number="5.2" class="anchored" data-anchor-id="filtering"><span class="h
.dataframe > thead > tr > th,
.dataframe > tbody > tr > td {
text-align: right;
white-space: pre-wrap;
}
</style>
<small>shape: (28, 6)</small><table class="dataframe table table-sm table-striped"><thead><tr><th>time</th><th>open</th><th>high</th><th>low</th><th>close</th><th>volume</th></tr><tr><td>date</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td></tr></thead><tbody><tr><td>2021-02-01</td><td>33092.97</td><td>34717.27</td><td>32296.16</td><td>33526.37</td><td>82718.276882</td></tr><tr><td>2021-02-02</td><td>33517.09</td><td>35984.33</td><td>33418.0</td><td>35466.24</td><td>78056.65988</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>2021-02-27</td><td>46276.88</td><td>48394.0</td><td>45000.0</td><td>46106.43</td><td>66060.834292</td></tr><tr><td>2021-02-28</td><td>46103.67</td><td>46638.46</td><td>43000.0</td><td>45135.66</td><td>83055.369042</td></tr></tbody></table></div>
Expand Down Expand Up @@ -456,7 +457,7 @@ <h3 data-number="5.3.1" class="anchored" data-anchor-id="downsampling"><span cla
<div class="cell" data-execution_count="4">
<div class="sourceCode cell-code" id="cb4"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a>(</span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a> ohlcv_pl</span>
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a> .groupby_dynamic(<span class="st">"time"</span>, every<span class="op">=</span><span class="st">"5d"</span>)</span>
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a> .group_by_dynamic(<span class="st">"time"</span>, every<span class="op">=</span><span class="st">"5d"</span>)</span>
<span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a> .agg(pl.col(pl.Float64).mean())</span>
<span id="cb4-5"><a href="#cb4-5" aria-hidden="true" tabindex="-1"></a>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-display" data-execution_count="4">
Expand All @@ -465,9 +466,10 @@ <h3 data-number="5.3.1" class="anchored" data-anchor-id="downsampling"><span cla
.dataframe > thead > tr > th,
.dataframe > tbody > tr > td {
text-align: right;
white-space: pre-wrap;
}
</style>
<small>shape: (74, 6)</small><table class="dataframe table table-sm table-striped"><thead><tr><th>time</th><th>open</th><th>high</th><th>low</th><th>close</th><th>volume</th></tr><tr><td>date</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td></tr></thead><tbody><tr><td>2021-01-01</td><td>31084.316</td><td>33127.622</td><td>29512.818</td><td>32089.662</td><td>112416.84957</td></tr><tr><td>2021-01-06</td><td>38165.31</td><td>40396.842</td><td>35983.822</td><td>39004.538</td><td>118750.076685</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>2021-12-27</td><td>48521.24</td><td>49475.878</td><td>47087.4</td><td>47609.528</td><td>35886.94371</td></tr><tr><td>2022-01-01</td><td>46216.93</td><td>47954.63</td><td>46208.37</td><td>47722.65</td><td>19604.46325</td></tr></tbody></table></div>
<small>shape: (74, 6)</small><table class="dataframe table table-sm table-striped"><thead><tr><th>time</th><th>open</th><th>high</th><th>low</th><th>close</th><th>volume</th></tr><tr><td>date</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td></tr></thead><tbody><tr><td>2020-12-29</td><td>29127.665</td><td>31450.0</td><td>28785.55</td><td>30755.01</td><td>92088.399186</td></tr><tr><td>2021-01-03</td><td>33577.028</td><td>36008.464</td><td>31916.198</td><td>35027.986</td><td>127574.470245</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>2021-12-24</td><td>50707.08</td><td>51407.656</td><td>49540.152</td><td>50048.066</td><td>29607.160572</td></tr><tr><td>2021-12-29</td><td>46836.5525</td><td>48135.4925</td><td>45970.84</td><td>46881.2775</td><td>31098.406725</td></tr></tbody></table></div>
</div>
</div>
</div>
Expand Down Expand Up @@ -555,7 +557,7 @@ <h3 data-number="5.3.1" class="anchored" data-anchor-id="downsampling"><span cla
<div class="cell" data-execution_count="6">
<div class="sourceCode cell-code" id="cb6"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a>(</span>
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a> ohlcv_pl</span>
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a> .groupby_dynamic(<span class="st">"time"</span>, every<span class="op">=</span><span class="st">"1w"</span>, start_by<span class="op">=</span><span class="st">"friday"</span>)</span>
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a> .group_by_dynamic(<span class="st">"time"</span>, every<span class="op">=</span><span class="st">"1w"</span>, start_by<span class="op">=</span><span class="st">"friday"</span>)</span>
<span id="cb6-4"><a href="#cb6-4" aria-hidden="true" tabindex="-1"></a> .agg([</span>
<span id="cb6-5"><a href="#cb6-5" aria-hidden="true" tabindex="-1"></a> pl.col(pl.Float64).mean().suffix(<span class="st">"_mean"</span>),</span>
<span id="cb6-6"><a href="#cb6-6" aria-hidden="true" tabindex="-1"></a> pl.col(pl.Float64).<span class="bu">sum</span>().suffix(<span class="st">"_sum"</span>)</span>
Expand All @@ -567,6 +569,7 @@ <h3 data-number="5.3.1" class="anchored" data-anchor-id="downsampling"><span cla
.dataframe > thead > tr > th,
.dataframe > tbody > tr > td {
text-align: right;
white-space: pre-wrap;
}
</style>
<small>shape: (53, 11)</small><table class="dataframe table table-sm table-striped"><thead><tr><th>time</th><th>open_mean</th><th>high_mean</th><th>low_mean</th><th>close_mean</th><th>volume_mean</th><th>open_sum</th><th>high_sum</th><th>low_sum</th><th>close_sum</th><th>volume_sum</th></tr><tr><td>date</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td></tr></thead><tbody><tr><td>2021-01-01</td><td>32305.781429</td><td>34706.045714</td><td>31021.727143</td><td>33807.135714</td><td>117435.5928</td><td>226140.47</td><td>242942.32</td><td>217152.09</td><td>236649.95</td><td>822049.149598</td></tr><tr><td>2021-01-08</td><td>37869.797143</td><td>39646.105714</td><td>34623.334286</td><td>37827.52</td><td>135188.296617</td><td>265088.58</td><td>277522.74</td><td>242363.34</td><td>264792.64</td><td>946318.076319</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>2021-12-24</td><td>49649.114286</td><td>50439.622857</td><td>48528.25</td><td>49117.98</td><td>31126.709793</td><td>347543.8</td><td>353077.36</td><td>339697.75</td><td>343825.86</td><td>217886.96855</td></tr><tr><td>2021-12-31</td><td>46668.905</td><td>48251.445</td><td>45943.185</td><td>46969.79</td><td>27271.230605</td><td>93337.81</td><td>96502.89</td><td>91886.37</td><td>93939.58</td><td>54542.46121</td></tr></tbody></table></div>
Expand Down Expand Up @@ -708,6 +711,7 @@ <h3 data-number="5.3.2" class="anchored" data-anchor-id="upsampling"><span class
.dataframe > thead > tr > th,
.dataframe > tbody > tr > td {
text-align: right;
white-space: pre-wrap;
}
</style>
<small>shape: (1_461, 6)</small><table class="dataframe table table-sm table-striped"><thead><tr><th>time</th><th>open</th><th>high</th><th>low</th><th>close</th><th>volume</th></tr><tr><td>date</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td></tr></thead><tbody><tr><td>2021-01-01</td><td>28923.63</td><td>29600.0</td><td>28624.57</td><td>29331.69</td><td>54182.925011</td></tr><tr><td>2021-01-01</td><td>null</td><td>null</td><td>null</td><td>null</td><td>null</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>2021-12-31</td><td>null</td><td>null</td><td>null</td><td>null</td><td>null</td></tr><tr><td>2022-01-01</td><td>46216.93</td><td>47954.63</td><td>46208.37</td><td>47722.65</td><td>19604.46325</td></tr></tbody></table></div>
Expand Down Expand Up @@ -914,6 +918,7 @@ <h3 data-number="5.5.1" class="anchored" data-anchor-id="offsets"><span class="h
.dataframe > thead > tr > th,
.dataframe > tbody > tr > td {
text-align: right;
white-space: pre-wrap;
}
</style>
<small>shape: (366, 1)</small><table class="dataframe table table-sm table-striped"><thead><tr><th>time</th></tr><tr><td>date</td></tr></thead><tbody><tr><td>2021-03-22</td></tr><tr><td>2021-03-23</td></tr><tr><td></td></tr><tr><td>2022-03-21</td></tr><tr><td>2022-03-22</td></tr></tbody></table></div>
Expand Down Expand Up @@ -980,6 +985,7 @@ <h3 data-number="5.5.3" class="anchored" data-anchor-id="timezones"><span class=
.dataframe > thead > tr > th,
.dataframe > tbody > tr > td {
text-align: right;
white-space: pre-wrap;
}
</style>
<small>shape: (366, 6)</small><table class="dataframe table table-sm table-striped"><thead><tr><th>time</th><th>open</th><th>high</th><th>low</th><th>close</th><th>volume</th></tr><tr><td>datetime[μs, US/Eastern]</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td><td>f64</td></tr></thead><tbody><tr><td>2020-12-31 19:00:00 EST</td><td>28923.63</td><td>29600.0</td><td>28624.57</td><td>29331.69</td><td>54182.925011</td></tr><tr><td>2021-01-01 19:00:00 EST</td><td>29331.7</td><td>33300.0</td><td>28946.53</td><td>32178.33</td><td>129993.873362</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>2021-12-30 19:00:00 EST</td><td>47120.88</td><td>48548.26</td><td>45678.0</td><td>46216.93</td><td>34937.99796</td></tr><tr><td>2021-12-31 19:00:00 EST</td><td>46216.93</td><td>47954.63</td><td>46208.37</td><td>47722.65</td><td>19604.46325</td></tr></tbody></table></div>
Expand Down
Binary file modified timeseries_files/figure-html/cell-11-output-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified timeseries_files/figure-html/cell-12-output-2.png
Binary file modified timeseries_files/figure-html/cell-13-output-2.png
Binary file modified timeseries_files/figure-html/cell-14-output-2.png

0 comments on commit 292c39d

Please sign in to comment.