Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This repository contains a subset of the [lecture-python-intro](https://intro.quantecon.org/intro.html).

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

## Development

Expand Down
7 changes: 7 additions & 0 deletions book/_admonition/wasm-compat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
```{admonition} WASM Compatibility
:class: warning

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.

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.
```
3 changes: 3 additions & 0 deletions book/business_cycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ kernelspec:

# Business Cycles

```{include} _admonition/wasm-compat.md
```

## Overview

In this lecture we review some empirical aspects of business cycles.
Expand Down
3 changes: 3 additions & 0 deletions book/commod_price.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ kernelspec:

# Commodity Prices

```{include} _admonition/wasm-compat.md
```

## Outline

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).
Expand Down
3 changes: 3 additions & 0 deletions book/heavy_tails.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ kernelspec:
(heavy_tail)=
# Heavy-Tailed Distributions

```{include} _admonition/wasm-compat.md
```

In addition to what's in Anaconda, this lecture will need the following libraries:

```{code-cell} ipython3
Expand Down
3 changes: 3 additions & 0 deletions book/inequality.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ kernelspec:

# Income and Wealth Inequality

```{include} _admonition/wasm-compat.md
```

## Overview

In the lecture {doc}`long_run_growth` we studied how GDP per capita has changed
Expand Down
4 changes: 2 additions & 2 deletions book/inflation_history.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def process_df(df):
df = df[~df.index.duplicated(keep='first')]

# Convert attribute values to numeric
df = df.map(lambda x: float(x) \
df = df.applymap(lambda x: float(x) \
if x != '—' else np.nan)

# Finally, we only focus on data between 1919 and 1925
Expand Down Expand Up @@ -383,7 +383,7 @@ for i in range(4):
# Apply process_entry on the selected sheet
sheet_list = [
pd.read_excel(xls, 'Table3.' + str(ind),
header=1).iloc[:row].map(process_entry)
header=1).iloc[:row].applymap(process_entry)
for ind, row in zip(indices, rows)]

sheet_list = [process_df(df) for df in sheet_list]
Expand Down
3 changes: 3 additions & 0 deletions book/lp_intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ kernelspec:
(lp_intro)=
# Linear Programming

```{include} _admonition/wasm-compat.md
```

In this lecture, we will need the following library. Install [ortools](https://developers.google.com/optimization) using `pip`.

```{code-cell} ipython3
Expand Down
3 changes: 3 additions & 0 deletions book/prob_dist.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ kernelspec:

# Distributions and Probabilities

```{include} _admonition/wasm-compat.md
```

```{index} single: Distributions and Probabilities
```

Expand Down