Skip to content

Commit 3ea89cd

Browse files
committed
update captions
1 parent 2e6c2c2 commit 3ea89cd

File tree

1 file changed

+39
-78
lines changed

1 file changed

+39
-78
lines changed

lectures/long_run_growth.md

Lines changed: 39 additions & 78 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.4
7+
jupytext_version: 1.14.5
88
kernelspec:
99
display_name: Python 3 (ipykernel)
1010
language: python
@@ -34,23 +34,17 @@ In a nutshell, this lecture records growth trajectories of various countries
3434

3535
While some countries have experienced long term rapid growth across that has lasted a hundred years, others have not.
3636

37-
3837
Since populations differ across country and within a country vary over time, it will
3938
be interesting to describe both total GNP and GNP per capita as it evolves within a country.
4039

41-
First let's import the packages needed to explore what the data says about long run growth.
42-
43-
This lecture growth trajectories of various countries over long time periods.
44-
45-
While some countries have experienced long term rapid growth across that has lasted a hundred years, others have not.
46-
47-
First let's import the packages needed to explore what the data says about long run growth.
40+
First let's import the packages needed to explore what the data says about long run growth
4841

4942
```{code-cell} ipython3
5043
import pandas as pd
5144
import os
5245
import matplotlib as mpl
5346
import matplotlib.pyplot as plt
47+
import matplotlib.cm as cm
5448
import numpy as np
5549
from collections import namedtuple
5650
from matplotlib.lines import Line2D
@@ -105,15 +99,7 @@ cntry_years
10599

106100
+++ {"user_expressions": []}
107101

108-
You can query this dataframe for each country of interest such as `Australia` by using `.loc`
109-
110-
```{code-cell} ipython3
111-
cntry_years.loc['Australia']
112-
```
113-
114-
+++ {"user_expressions": []}
115-
116-
Let us now reshape the original data into some convenient variables to enable quicker access to countries time series data.
102+
Let's now reshape the original data into some convenient variables to enable quicker access to countries time series data.
117103

118104
We can build a useful mapping between country code's and country names in this dataset
119105

@@ -130,10 +116,6 @@ data
130116
```
131117

132118
```{code-cell} ipython3
133-
import matplotlib.pyplot as plt
134-
import matplotlib.cm as cm
135-
import numpy as np
136-
137119
country_names = data['countrycode']
138120
139121
# Generate a colormap with the number of colors matching the number of countries
@@ -176,6 +158,10 @@ _ = gdppc[cntry].plot(
176158

177159
+++ {"user_expressions": []}
178160

161+
:::{note}
162+
[International Dollars](https://en.wikipedia.org/wiki/International_dollar) are a hypothetical unit of currency that has the same purchasing power parity that the U.S. Dollar has in the United States at any given time. They are also known as Geary–Khamis dollars (GK Dollars).
163+
:::
164+
179165
We can see that the data is non-continuous for longer periods in the early part of this millennium, so we could choose to interpolate to get a continuous line plot.
180166

181167
Here we use dashed lines to indicate interpolated trends
@@ -243,10 +229,6 @@ def draw_interp_plots(series, ylabel, xlabel, color_mapping, code_to_name, lw, l
243229

244230
+++ {"user_expressions": []}
245231

246-
:::{note}
247-
[International Dollars](https://en.wikipedia.org/wiki/International_dollar) are a hypothetical unit of currency that has the same purchasing power parity that the U.S. Dollar has in the United States at any given time. They are also known as Geary–Khamis dollars (GK Dollars).
248-
:::
249-
250232
As you can see from this chart economic growth started in earnest in the 18th century and continued for the next two hundred years.
251233

252234
How does this compare with other countries' growth trajectories?
@@ -257,7 +239,7 @@ Let's look at the United States (USA), United Kingdom (GBR), and China (CHN)
257239
---
258240
mystnb:
259241
figure:
260-
caption: GDP per Capita (China, UK, USA)
242+
caption: GDP per Capita, 1500- (China, UK, USA)
261243
name: gdppc_comparison
262244
---
263245
# Define the namedtuple for the events
@@ -345,7 +327,7 @@ Thus, the graph indicates
345327
---
346328
mystnb:
347329
figure:
348-
caption: GDP per Capita (China)
330+
caption: GDP per Capita, 1500-2000 (China)
349331
name: gdppc_china
350332
---
351333
fig, ax = plt.subplots(dpi=300, figsize=(10, 6))
@@ -395,14 +377,14 @@ In the following graph, please watch for
395377
- impact of trade policy (Navigation Act)
396378
- productivity changes brought by the industrial revolution
397379
- how the US gradually approaches and then surpasses the UK, setting the stage for the ``American Century''
398-
- the often unanticipated consequenes of Wars
399-
- interruptions and scars left by business cycle recessions and depressions
380+
- the often unanticipated consequenes of wars
381+
- interruptions and scars left by {ref}`business cycle<mc1_ex_1>` recessions and depressions
400382

401383
```{code-cell} ipython3
402384
---
403385
mystnb:
404386
figure:
405-
caption: GDP per Capita (UK and US)
387+
caption: GDP per Capita, 1500-2000 (UK and US)
406388
name: gdppc_ukus
407389
---
408390
fig, ax = plt.subplots(dpi=300, figsize=(10, 6))
@@ -467,88 +449,54 @@ gdp = data['gdp'].unstack('countrycode')
467449
### Early industralization (1820 to 1940)
468450

469451

470-
Gross Domestic Product
452+
We first visualize the trend of China, the Former Soviet Union, Japan, the UK and the US.
471453

472-
```{code-cell} ipython3
473-
---
474-
mystnb:
475-
figure:
476-
caption: GDP
477-
name: gdp1
478-
---
479-
fig, ax = plt.subplots(dpi=300)
480-
ax = fig.gca()
481-
cntry = ['CHN', 'SUN', 'JPN', 'GBR', 'USA']
482-
start_year, end_year = (1820, 1940)
483-
ax = draw_interp_plots(gdp[cntry].loc[start_year:end_year],
484-
'International $\'s','Year',
485-
color_mapping, code_to_name, 2, False, ax)
486-
```
454+
The most notable trend is the rise of the US, surpassing the UK in the 1860s and China in the 1880s.
487455

488-
+++ {"user_expressions": []}
456+
The growth continued until the large dip in the 1930s when the Great Depression hit.
489457

490-
GDP per Capita
458+
Meanwhile, Russia experienced significant setbacks during World War I and recovered significantly after the February Revolution.
491459

492460
```{code-cell} ipython3
493461
---
494462
mystnb:
495463
figure:
496-
caption: GDP per Capita
497-
name: gdppc1
464+
caption: GDP in the early industralization era
465+
name: gdp1
498466
---
499467
fig, ax = plt.subplots(dpi=300)
500468
ax = fig.gca()
501469
cntry = ['CHN', 'SUN', 'JPN', 'GBR', 'USA']
502470
start_year, end_year = (1820, 1940)
503-
ax = draw_interp_plots(gdppc[cntry].loc[start_year:end_year],
471+
ax = draw_interp_plots(gdp[cntry].loc[start_year:end_year],
504472
'International $\'s','Year',
505473
color_mapping, code_to_name, 2, False, ax)
506474
```
507475

508476
+++ {"user_expressions": []}
509477

510-
### The modern era (1970 to 2018)
478+
### The modern era (1950 to 2020)
511479

512-
Gross Domestic Product (GDP)
480+
As history repeats itself, the rapid growth in modern China is now challenging the economic hegemony of the US
513481

514482
```{code-cell} ipython3
515483
---
516484
mystnb:
517485
figure:
518-
caption: GDP
486+
caption: GDP in the modern era
519487
name: gdp2
520488
---
521489
fig, ax = plt.subplots(dpi=300)
522490
ax = fig.gca()
523-
cntry = ['CHN', 'SUN', 'JPN', 'USA']
524-
start_year, end_year = (1970, 2020)
491+
cntry = ['CHN', 'SUN', 'JPN', 'GBR', 'USA']
492+
start_year, end_year = (1950, 2020)
525493
ax = draw_interp_plots(gdp[cntry].loc[start_year:end_year],
526494
'International $\'s','Year',
527495
color_mapping, code_to_name, 2, False, ax)
528496
```
529497

530498
+++ {"user_expressions": []}
531499

532-
GDP per Capita
533-
534-
```{code-cell} ipython3
535-
---
536-
mystnb:
537-
figure:
538-
caption: GDP per Capita
539-
name: gdppc2
540-
---
541-
fig, ax = plt.subplots(dpi=300)
542-
ax = fig.gca()
543-
cntry = ['CHN', 'SUN', 'JPN', 'USA']
544-
start_year, end_year = (1970, 2020)
545-
ax = draw_interp_plots(gdppc[cntry].loc[start_year:end_year],
546-
'International $\'s','Year',
547-
color_mapping, code_to_name, 2, False, ax)
548-
```
549-
550-
+++ {"user_expressions": []}
551-
552500
## Regional Analysis
553501

554502
We often want to study historical experiences of countries outside the club of "World Powers".
@@ -586,11 +534,17 @@ worldgdppc = regionalgdppc['World GDP pc']
586534
```
587535

588536
```{code-cell} ipython3
537+
---
538+
mystnb:
539+
figure:
540+
caption: World GDP per capita
541+
name: world_gdppc
542+
---
543+
589544
fig = plt.figure(dpi=300)
590545
ax = fig.gca()
591546
ax = worldgdppc.plot(
592547
ax = ax,
593-
title='World GDP per capita',
594548
xlabel='Year',
595549
ylabel='2011 US$',
596550
)
@@ -605,6 +559,13 @@ Looking more closely, let us compare the time series for `Western Offshoots` and
605559
and more broadly at a number of different regions around the world
606560

607561
```{code-cell} ipython3
562+
---
563+
mystnb:
564+
figure:
565+
caption: Regional GDP per capita
566+
name: region_gdppc
567+
---
568+
608569
fig = plt.figure(dpi=300)
609570
ax = fig.gca()
610571
line_styles = ['-', '--', ':', '-.', '.', 'o', '-', '--', '-']

0 commit comments

Comments
 (0)