Skip to content

Commit f83ecee

Browse files
committed
lake_model revert
1 parent 275fc70 commit f83ecee

File tree

2 files changed

+6
-42
lines changed

2 files changed

+6
-42
lines changed
23.2 KB
Loading

lectures/lake_model.md

Lines changed: 6 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ jupytext:
44
extension: .md
55
format_name: myst
66
format_version: 0.13
7-
jupytext_version: 1.14.5
7+
jupytext_version: 1.14.4
88
kernelspec:
99
display_name: Python 3 (ipykernel)
1010
language: python
@@ -17,29 +17,9 @@ kernelspec:
1717

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

20-
```{code-cell} ipython
21-
---
22-
tags: [hide-output]
23-
---
24-
!pip install graphviz
25-
```
26-
27-
```{admonition} graphviz
28-
:class: warning
29-
If you are running this lecture locally it requires [graphviz](https://www.graphviz.org)
30-
to be installed on your computer. Installation instructions for graphviz can be found
31-
[here](https://www.graphviz.org/download/)
32-
```
33-
34-
This lecture studies a model of employment and unemployment flows in a large
35-
population called the **lake model**.
36-
37-
We will use the following imports in this lecture.
38-
3920
```{code-cell} ipython3
4021
import numpy as np
4122
import matplotlib.pyplot as plt
42-
from graphviz import Digraph
4323
```
4424

4525
## The Lake model
@@ -58,26 +38,10 @@ The "flows" between the two lakes are as follows:
5838

5939
The below graph illustrates the lake model.
6040

61-
```{code-cell} ipython3
62-
# Create Digraph object
63-
G = Digraph()
64-
G.attr(rankdir='LR')
65-
66-
# Add nodes
67-
G.attr('node', shape='circle')
68-
G.node('1', 'New entrants', color='blue')
69-
G.node('2', 'Unemployed')
70-
G.node('3', 'Employed')
71-
72-
# Add edges
73-
G.edge('1', '2', label='b')
74-
G.edge('2', '3', label='λ(1-d)')
75-
G.edge('3', '2', label='α(1-d)')
76-
G.edge('2', '2', label='(1-λ)(1-d)')
77-
G.edge('3', '3', label='(1-α)(1-d)')
78-
79-
# Show graphviz
80-
G
41+
```{figure} /_static/lecture_specific/lake_model/lake_model_worker.png
42+
:name: lake_model_graphviz
43+
44+
An illustration of the lake model
8145
```
8246

8347
## Dynamics
@@ -603,4 +567,4 @@ plt.show()
603567
```
604568

605569
```{solution-end}
606-
```
570+
```

0 commit comments

Comments
 (0)