Skip to content

Commit de29ddf

Browse files
committed
Plotly
1 parent b8ff7f5 commit de29ddf

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3410,7 +3410,7 @@ from plotly.express import line
34103410
<Figure>.write_html/json/image('<path>') # Also: <Figure>.show()
34113411
```
34123412

3413-
#### Covid deaths by continent:
3413+
#### Displays a line chart of total coronavirus deaths per million grouped by continent:
34143414

34153415
![Covid Deaths](web/covid_deaths.png)
34163416
<div id="2a950764-39fc-416d-97fe-0a6226a3095f" class="plotly-graph-div" style="height:340px; width:100%;"></div>
@@ -3429,7 +3429,7 @@ df = df.rename({'date': 'Date', 'Continent_Name': 'Continent'}, axis='columns')
34293429
line(df, x='Date', y='Total Deaths per Million', color='Continent').show()
34303430
```
34313431

3432-
#### Confirmed covid cases, Dow Jones, Gold, and Bitcoin price:
3432+
#### Displays a multi-axis line chart of total coronavirus cases and changes in prices of Bitcoin, Dow Jones and gold:
34333433

34343434
![Covid Cases](web/covid_cases.png)
34353435
<div id="e23ccacc-a456-478b-b467-7282a2165921" class="plotly-graph-div" style="height:315px; width:100%;"></div>

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2779,7 +2779,7 @@ <h3 id="format-2">Format</h3><div><h4 id="forstandardtypesizesandmanualalignment
27792779
&lt;Figure&gt;.write_html/json/image(<span class="hljs-string">'&lt;path&gt;'</span>) <span class="hljs-comment"># Also: &lt;Figure&gt;.show()</span>
27802780
</code></pre></div>
27812781

2782-
<div><h4 id="coviddeathsbycontinent">Covid deaths by continent:</h4><p></p><div id="2a950764-39fc-416d-97fe-0a6226a3095f" class="plotly-graph-div" style="height:340px; width:100%;"></div><pre><code class="python language-python hljs">covid = pd.read_csv(<span class="hljs-string">'https://covid.ourworldindata.org/data/owid-covid-data.csv'</span>,
2782+
<div><h4 id="displaysalinechartoftotalcoronavirusdeathspermilliongroupedbycontinent">Displays a line chart of total coronavirus deaths per million grouped by continent:</h4><p></p><div id="2a950764-39fc-416d-97fe-0a6226a3095f" class="plotly-graph-div" style="height:340px; width:100%;"></div><pre><code class="python language-python hljs">covid = pd.read_csv(<span class="hljs-string">'https://covid.ourworldindata.org/data/owid-covid-data.csv'</span>,
27832783
usecols=[<span class="hljs-string">'iso_code'</span>, <span class="hljs-string">'date'</span>, <span class="hljs-string">'total_deaths'</span>, <span class="hljs-string">'population'</span>])
27842784
continents = pd.read_csv(<span class="hljs-string">'https://gist.githubusercontent.com/stevewithington/20a69c0b6d2ff'</span>
27852785
<span class="hljs-string">'846ea5d35e5fc47f26c/raw/country-and-continent-codes-list-csv.csv'</span>,
@@ -2794,7 +2794,7 @@ <h3 id="format-2">Format</h3><div><h4 id="forstandardtypesizesandmanualalignment
27942794

27952795

27962796

2797-
<div><h4 id="confirmedcovidcasesdowjonesgoldandbitcoinprice">Confirmed covid cases, Dow Jones, Gold, and Bitcoin price:</h4><p></p><div id="e23ccacc-a456-478b-b467-7282a2165921" class="plotly-graph-div" style="height:315px; width:100%;"></div><pre><code class="python language-python hljs"><span class="hljs-keyword">import</span> pandas <span class="hljs-keyword">as</span> pd
2797+
<div><h4 id="displaysamultiaxislinechartoftotalcoronaviruscasesandchangesinpricesofbitcoindowjonesandgold">Displays a multi-axis line chart of total coronavirus cases and changes in prices of Bitcoin, Dow Jones and gold:</h4><p></p><div id="e23ccacc-a456-478b-b467-7282a2165921" class="plotly-graph-div" style="height:315px; width:100%;"></div><pre><code class="python language-python hljs"><span class="hljs-keyword">import</span> pandas <span class="hljs-keyword">as</span> pd
27982798
<span class="hljs-keyword">import</span> plotly.graph_objects <span class="hljs-keyword">as</span> go
27992799

28002800
<span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">main</span><span class="hljs-params">()</span>:</span>

pdf/index_for_pdf.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ <h3 id="c">C</h3>
3232
<strong>copy function, <a href="#copy">15</a></strong><br>
3333
<strong>coroutine, <a href="#coroutines">33</a></strong><br>
3434
<strong>counter, <a href="#counter">2</a>, <a href="#generator">4</a>, <a href="#nonlocal">12</a>, <a href="#iterator-1">17</a></strong><br>
35-
<strong>csv, <a href="#csv">26</a>, <a href="#printsacsvfileasanasciitable">34</a>, <a href="#dataframeencodedecodeplot">46</a>, <a href="#coviddeathsbycontinent">47</a></strong><br>
35+
<strong>csv, <a href="#csv">26</a>, <a href="#printsacsvfileasanasciitable">34</a>, <a href="#dataframeencodedecodeplot">46</a>, <a href="#displaysalinechartoftotalcoronavirusdeathspermilliongroupedbycontinent">47</a></strong><br>
3636
<strong>curses module, <a href="#runsaterminalgamewhereyoucontrolanasteriskthatmustavoidnumbers">33</a>, <a href="#curses">34</a></strong><br>
3737
<strong>cython, <a href="#cython">49</a></strong> </p>
3838
<h3 id="d">D</h3>
@@ -96,12 +96,12 @@ <h3 id="o">O</h3>
9696
<strong>operator module, <a href="#operator">31</a></strong><br>
9797
<strong>os commands, <a href="#paths">23</a>-<a href="#shellcommands">25</a>, <a href="#runsabasicfileexplorerintheterminal">34</a></strong> </p>
9898
<h3 id="p">P</h3>
99-
<p><strong>pandas library, <a href="#pandas">44</a>-<a href="#confirmedcovidcasesdowjonesgoldandbitcoinprice">48</a></strong><br>
99+
<p><strong>pandas library, <a href="#pandas">44</a>-<a href="#displaysamultiaxislinechartoftotalcoronaviruscasesandchangesinpricesofbitcoindowjonesandgold">48</a></strong><br>
100100
<strong>partial function, <a href="#partial">12</a>, <a href="#userdefinedfunctionscannotbevaluessotheymustbewrapped">20</a></strong><br>
101101
<strong>paths, <a href="#paths">23</a>-<a href="#direntry">24</a>, <a href="#runsabasicfileexplorerintheterminal">34</a></strong><br>
102102
<strong>pickle module, <a href="#pickle">25</a></strong><br>
103103
<strong>pillow library, <a href="#image">39</a>-<a href="#animation">40</a></strong><br>
104-
<strong>plotting, <a href="#plot">34</a>, <a href="#dataframeencodedecodeplot">46</a>, <a href="#plotly">47</a>-<a href="#confirmedcovidcasesdowjonesgoldandbitcoinprice">48</a></strong><br>
104+
<strong>plotting, <a href="#plot">34</a>, <a href="#dataframeencodedecodeplot">46</a>, <a href="#plotly">47</a>-<a href="#displaysamultiaxislinechartoftotalcoronaviruscasesandchangesinpricesofbitcoindowjonesandgold">48</a></strong><br>
105105
<strong>print function, <a href="#print">22</a></strong><br>
106106
<strong>profiling, <a href="#profiling">36</a>-<a href="#timingasnippet">37</a></strong><br>
107107
<strong>progress bar, <a href="#progressbar">34</a></strong><br>
@@ -117,7 +117,7 @@ <h3 id="r">R</h3>
117117
<strong>regular expressions, <a href="#regex">5</a>-<a href="#specialsequences">6</a></strong><br>
118118
<strong>requests library, <a href="#scrapespythonsurlversionnumberandlogofromitswikipediapage">35</a>, <a href="#test">36</a></strong> </p>
119119
<h3 id="s">S</h3>
120-
<p><strong>scraping, <a href="#scraping">35</a>, <a href="#basicmariobrothersexample">43</a>, <a href="#dataframeencodedecodeplot">46</a>, <a href="#coviddeathsbycontinent">47</a>-<a href="#confirmedcovidcasesdowjonesgoldandbitcoinprice">48</a></strong><br>
120+
<p><strong>scraping, <a href="#scraping">35</a>, <a href="#basicmariobrothersexample">43</a>, <a href="#dataframeencodedecodeplot">46</a>, <a href="#displaysalinechartoftotalcoronavirusdeathspermilliongroupedbycontinent">47</a>-<a href="#displaysamultiaxislinechartoftotalcoronaviruscasesandchangesinpricesofbitcoindowjonesandgold">48</a></strong><br>
121121
<strong>sequence, <a href="#abstractbaseclasses">4</a>, <a href="#sequence">18</a>-<a href="#abcsequence">19</a></strong><br>
122122
<strong>sets, <a href="#set">2</a>, <a href="#abstractbaseclasses">4</a>, <a href="#otheruses">11</a>, <a href="#tableofrequiredandautomaticallyavailablespecialmethods">19</a>, <a href="#collectionsandtheirexceptions">21</a>, <a href="#operator">31</a></strong><br>
123123
<strong>shell commands, <a href="#shellcommands">25</a></strong><br>
@@ -126,7 +126,7 @@ <h3 id="s">S</h3>
126126
<strong>sortable, <a href="#list">1</a>, <a href="#sortable">16</a></strong><br>
127127
<strong>splat operator, <a href="#splatoperator">10</a>-<a href="#otheruses">11</a></strong><br>
128128
<strong>sql, <a href="#sqlite">27</a>, <a href="#dataframeencodedecodeplot">46</a></strong><br>
129-
<strong>statistics, <a href="#statistics">7</a>, <a href="#numpy">37</a>-<a href="#indexing">38</a>, <a href="#pandas">44</a>-<a href="#confirmedcovidcasesdowjonesgoldandbitcoinprice">48</a></strong><br>
129+
<strong>statistics, <a href="#statistics">7</a>, <a href="#numpy">37</a>-<a href="#indexing">38</a>, <a href="#pandas">44</a>-<a href="#displaysamultiaxislinechartoftotalcoronaviruscasesandchangesinpricesofbitcoindowjonesandgold">48</a></strong><br>
130130
<strong>strings, <a href="#abstractbaseclasses">4</a>-<a href="#comparisonofpresentationtypes">7</a>, <a href="#class">14</a></strong><br>
131131
<strong>struct module, <a href="#struct">28</a>-<a href="#integertypesuseacapitalletterforunsignedtypeminimumandstandardsizesareinbrackets">29</a></strong><br>
132132
<strong>subprocess module, <a href="#sends11tothebasiccalculatorandcapturesitsoutput">25</a></strong><br>

0 commit comments

Comments
 (0)