Skip to content

Commit 3532b19

Browse files
authored
Merge pull request #25 from QuantEcon/edits
Adding admonition to the lectures
2 parents 3d2eeb2 + 1323609 commit 3532b19

File tree

9 files changed

+28
-3
lines changed

9 files changed

+28
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
This repository contains a subset of the [lecture-python-intro](https://intro.quantecon.org/intro.html).
44

55
This project is powered by Pyodide kernel which allows us to run the lectures in the browser without
6-
any installaion.
6+
any installation.
77

88
## Development
99

book/_admonition/wasm-compat.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
```{admonition} WASM Compatibility
2+
:class: warning
3+
4+
Some libraries like yfinance or ortools in this lecture series might not be compatible with Web Assemblies (WASM). This warning has been included above each of the lecture series, where the particular lecture series is not compatible with WASM.
5+
6+
To run the lectures, above each lecture, there is a 'rocket' icon and it makes the particular lecture file ready to run, which would help you run the codes in the lecture in the browser itself, just like you'd run a native app on your desktop.
7+
```

book/business_cycle.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ kernelspec:
1313

1414
# Business Cycles
1515

16+
```{include} _admonition/wasm-compat.md
17+
```
18+
1619
## Overview
1720

1821
In this lecture we review some empirical aspects of business cycles.

book/commod_price.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ kernelspec:
1414

1515
# Commodity Prices
1616

17+
```{include} _admonition/wasm-compat.md
18+
```
19+
1720
## Outline
1821

1922
For more than half of all countries around the globe, [commodities](https://en.wikipedia.org/wiki/Commodity) account for [the majority of total exports](https://unctad.org/publication/commodities-and-development-report-2019).

book/heavy_tails.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ kernelspec:
1414
(heavy_tail)=
1515
# Heavy-Tailed Distributions
1616

17+
```{include} _admonition/wasm-compat.md
18+
```
19+
1720
In addition to what's in Anaconda, this lecture will need the following libraries:
1821

1922
```{code-cell} ipython3

book/inequality.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ kernelspec:
1313

1414
# Income and Wealth Inequality
1515

16+
```{include} _admonition/wasm-compat.md
17+
```
18+
1619
## Overview
1720

1821
In the lecture {doc}`long_run_growth` we studied how GDP per capita has changed

book/inflation_history.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def process_df(df):
280280
df = df[~df.index.duplicated(keep='first')]
281281
282282
# Convert attribute values to numeric
283-
df = df.map(lambda x: float(x) \
283+
df = df.applymap(lambda x: float(x) \
284284
if x != '—' else np.nan)
285285
286286
# Finally, we only focus on data between 1919 and 1925
@@ -383,7 +383,7 @@ for i in range(4):
383383
# Apply process_entry on the selected sheet
384384
sheet_list = [
385385
pd.read_excel(xls, 'Table3.' + str(ind),
386-
header=1).iloc[:row].map(process_entry)
386+
header=1).iloc[:row].applymap(process_entry)
387387
for ind, row in zip(indices, rows)]
388388
389389
sheet_list = [process_df(df) for df in sheet_list]

book/lp_intro.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ kernelspec:
1212
(lp_intro)=
1313
# Linear Programming
1414

15+
```{include} _admonition/wasm-compat.md
16+
```
17+
1518
In this lecture, we will need the following library. Install [ortools](https://developers.google.com/optimization) using `pip`.
1619

1720
```{code-cell} ipython3

book/prob_dist.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ kernelspec:
1313

1414
# Distributions and Probabilities
1515

16+
```{include} _admonition/wasm-compat.md
17+
```
18+
1619
```{index} single: Distributions and Probabilities
1720
```
1821

0 commit comments

Comments
 (0)