Skip to content

Commit 008d47b

Browse files
committed
fix_building_error
1 parent 1d94461 commit 008d47b

File tree

1 file changed

+21
-19
lines changed

1 file changed

+21
-19
lines changed

lectures/input_output.md

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,17 @@ kernelspec:
1111
name: python3
1212
---
1313

14-
14+
(input_output)=
1515
# Input-Output Models
1616

17-
## Overview
18-
19-
The following figure illustrates a network of linkages between 71 sectors obtained from the US Bureau of Economic Analysis’s
20-
2019 Input-Output Accounts Data.
17+
```{contents} Contents
18+
:depth: 2
19+
```
2120

2221
```{code-cell} ipython3
23-
---
24-
jupyter:
25-
outputs_hidden: true
26-
source_hidden: true
27-
---
28-
pip install --upgrade quantecon_book_networks
22+
:tags: [hide-output]
23+
24+
!pip install --upgrade quantecon_book_networks quantecon pandas_datareader
2925
```
3026

3127
In this lecture, we will need the following library.
@@ -37,22 +33,29 @@ import networkx as nx
3733
```
3834

3935
```{code-cell} ipython3
40-
#hide
36+
:tags: [hide-input]
4137
4238
import quantecon as qe
4339
import quantecon_book_networks
4440
import quantecon_book_networks.input_output as qbn_io
4541
import quantecon_book_networks.plotting as qbn_plt
4642
import quantecon_book_networks.data as qbn_data
47-
ch2_data = qbn_data.production()
4843
import matplotlib.pyplot as plt
4944
import matplotlib.cm as cm
5045
import matplotlib.colors as plc
5146
from matplotlib import cm
5247
quantecon_book_networks.config("matplotlib")
5348
import matplotlib as mpl
5449
mpl.rcParams.update(mpl.rcParamsDefault)
50+
```
51+
52+
## Overview
5553

54+
The following figure illustrates a network of linkages between 71 sectors obtained from the US Bureau of Economic Analysis’s
55+
2019 Input-Output Accounts Data.
56+
57+
```{code-cell} ipython3
58+
ch2_data = qbn_data.production()
5659
codes_71 = ch2_data['us_sectors_71']['codes']
5760
A_71 = ch2_data['us_sectors_71']['adjacency_matrix']
5861
X_71 = ch2_data['us_sectors_71']['total_industry_sales']
@@ -74,8 +77,6 @@ qbn_plt.plot_graph(A_71, X_71, ax, codes_71,
7477
plt.show()
7578
```
7679

77-
+++
78-
7980
An arrow from $i$ to $j$ implies that sector $i$ supplies some of its output as raw material to sector $j$.
8081

8182
Economies are characterised by many such complex and interdependent multisector production networks.
@@ -86,7 +87,7 @@ This model's key aspect is its simplicity.
8687

8788
In this lecture, we introduce the standard input-ouput model and approach it as a [linear programming](link to lpp lecture) problem.
8889

89-
+++
90+
+++
9091

9192
## Input Output Analysis
9293

@@ -117,7 +118,7 @@ To illustrate ideas, we begin by setting $n =2$.
117118
The following is a simple illustration of this network.
118119

119120
```{code-cell} ipython3
120-
:tags: [hide_input]
121+
:tags: [hide-input]
121122
122123
G = nx.DiGraph()
123124
@@ -146,8 +147,6 @@ plt.text(0.955,-0.05, r'$x_{12}$')
146147
plt.show()
147148
```
148149

149-
+++
150-
151150
## Feasible allocations must satisfy
152151

153152
$$
@@ -333,3 +332,6 @@ $$
333332
334333
where $L$ is a vector of labor services used in each industry.
335334
335+
```{code-cell} ipython3
336+
337+
```

0 commit comments

Comments
 (0)