Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 75e5300

Browse files
committed
New plots and exceptions fix
1 parent fab2ef9 commit 75e5300

File tree

8 files changed

+851
-511
lines changed

8 files changed

+851
-511
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1415,7 +1415,6 @@ BaseException
14151415
| +-- KeyError # Raised when a dictionary key or set element is not found.
14161416
+-- NameError # Raised when a variable name is not found.
14171417
+-- OSError # Errors such as “file not found” or “disk full” (see Open).
1418-
14191418
| +-- FileNotFoundError # When a file or directory is requested but doesn't exist.
14201419
+-- RuntimeError # Raised by errors that don't fall into other categories.
14211420
| +-- RecursionError # Raised when the maximum recursion depth is exceeded.
@@ -3369,7 +3368,7 @@ continents = pd.read_csv('https://datahub.io/JohnSnowLabs/country-and-continent-
33693368
df = pd.merge(covid, continents, left_on='iso_code', right_on='Three_Letter_Country_Code')
33703369
df = df.groupby(['Continent_Name', 'date']).sum().reset_index()
33713370
df['Total Deaths per Million'] = df.total_deaths * 1e6 / df.population
3372-
df = df[('2020-03-14' < df.date) & (df.date < '2020-11-08')]
3371+
df = df[('2020-03-14' < df.date) & (df.date < '2020-11-25')]
33733372
df = df.rename({'date': 'Date', 'Continent_Name': 'Continent'}, axis='columns')
33743373
line(df, x='Date', y='Total Deaths per Million', color='Continent').show()
33753374
```

index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@
213213

214214
<body>
215215
<header>
216-
<aside>November 10, 2020</aside>
216+
<aside>November 25, 2020</aside>
217217
<a href="https://gto76.github.io" rel="author">Jure Šorn</a>
218218
</header>
219219

@@ -2859,7 +2859,7 @@
28592859
df = pd.merge(covid, continents, left_on=<span class="hljs-string">'iso_code'</span>, right_on=<span class="hljs-string">'Three_Letter_Country_Code'</span>)
28602860
df = df.groupby([<span class="hljs-string">'Continent_Name'</span>, <span class="hljs-string">'date'</span>]).sum().reset_index()
28612861
df[<span class="hljs-string">'Total Deaths per Million'</span>] = df.total_deaths * <span class="hljs-number">1e6</span> / df.population
2862-
df = df[(<span class="hljs-string">'2020-03-14'</span> &lt; df.date) &amp; (df.date &lt; <span class="hljs-string">'2020-11-08'</span>)]
2862+
df = df[(<span class="hljs-string">'2020-03-14'</span> &lt; df.date) &amp; (df.date &lt; <span class="hljs-string">'2020-11-25'</span>)]
28632863
df = df.rename({<span class="hljs-string">'date'</span>: <span class="hljs-string">'Date'</span>, <span class="hljs-string">'Continent_Name'</span>: <span class="hljs-string">'Continent'</span>}, axis=<span class="hljs-string">'columns'</span>)
28642864
line(df, x=<span class="hljs-string">'Date'</span>, y=<span class="hljs-string">'Total Deaths per Million'</span>, color=<span class="hljs-string">'Continent'</span>).show()
28652865
</code></pre></div>
@@ -2991,7 +2991,7 @@
29912991

29922992

29932993
<footer>
2994-
<aside>November 10, 2020</aside>
2994+
<aside>November 25, 2020</aside>
29952995
<a href="../" rel="author">Jure Šorn</a>
29962996
</footer>
29972997

pdf/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Printing to PDF
1717
* Change brightness of comments by right clicking on them and selecting inspect. Then click on the rectangle that represents color and toggle the color space to HSLA by clicking on the button with two vertical arrows.
1818
* Change lightness (L) percentage to 77%.
1919
* Open `index.html` in Chrome and select 'Print...'.
20-
* Select destination 'Save as PDF', paper size 'A4', customised margins of top 10mm, right 9.5mm, bottom 5mm and left 10mm, 'Default' scale and no headers and footers and save (the document should be 50 pages long).
20+
* Select destination 'Save as PDF', paper size 'A4', customised margins of top 10mm, right 9.5mm, bottom 5mm and left 10mm, 'Default' scale and no headers and footers and save (the document should be 51 pages long with last page empty).
2121

2222
### PDF optimized for laser color printing
2323
* Run `./parse.js` again.
@@ -35,7 +35,7 @@ Printing to PDF
3535
* 58% for the comments.
3636
* Individually change brightness of every comment line that starts with: `# $ pip3 install
3737
...` and of comments in basic script template to 57%, by adding `color: hsla(0, 0%, 57%, 1);` to their element.style.
38-
* Select 'Print...' with destination 'Save as PDF', paper size 'A4', customised margins of top 10mm, right 9.5mm, bottom 5mm and left 10mm, 'Default' scale and no headers and footers and save (the document should be 50 pages long).
38+
* Select 'Print...' with destination 'Save as PDF', paper size 'A4', customised margins of top 10mm, right 9.5mm, bottom 5mm and left 10mm, 'Default' scale and no headers and footers and save (the document should be 51 pages long with last page empty).
3939

4040
Adding headers and footers to PDF (the same for both files)
4141
-----------------------------------------------------------
@@ -46,7 +46,8 @@ Adding headers and footers to PDF (the same for both files)
4646
* Select 'Edit PDF' tab and add headers and footers by clicking 'Header & Footer' button, selecting a preset from 'Saved Settings' dropdown menu and clicking ok. Repeat the process for each preset.
4747
* If presets get lost, the font and the margins are as follow: Borders: left-line: 0.6, left-text: 0.8, top-line: 11.4, bottom-text: 0.27, right-text-odd: 0.57, font-name: menlo, font-size: 8.
4848
* Set title and author by selecting 'File/Properties...'.
49-
* Save in Adobe, Optimized format.
49+
* Save the progress by running 'Save as' in 'Adobe PDF format'.
50+
* Run 'Save as' again, this time in 'Adobe optimized format', so that Menlo font error gets fixed.
5051

5152
Printing the PDF
5253
----------------

0 commit comments

Comments
 (0)