Skip to content

Commit d3156e6

Browse files
committed
update typos and implement changes requested
1 parent 139b39d commit d3156e6

File tree

1 file changed

+56
-58
lines changed

1 file changed

+56
-58
lines changed

lectures/long_run_growth.md

Lines changed: 56 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -15,29 +15,29 @@ kernelspec:
1515

1616
## Overview
1717

18-
In this lecture we use Python, Pandas, and Matplotlib to download, organize, and visualize historical data on economic growth.
18+
In this lecture we use Python, [pandas](https://pandas.pydata.org/), and [Matplotlib](https://matplotlib.org/) to download, organize, and visualize historical data on economic growth.
1919

20-
In addition to learning how to deploy these tools more generally, we'll use them to describe facts about economic growth experiences across many countries over several centuries.
20+
In addition to learning how to deploy these tools more generally, we'll use them to describe facts about economic growth experiences across many countries over several centuries.
2121

22-
Such "growth facts" are interesting for a variety of reasons.
22+
Such "growth facts" are interesting for a variety of reasons.
2323

24-
Explaining growth facts is a principal purpose of both "development economics" and "economic history".
24+
Explaining growth facts is a principal purpose of both "development economics" and "economic history".
2525

26-
And growth facts are important inputs into historians' studies of geopolitical forces and dynamics.
26+
And growth facts are important inputs into historians' studies of geopolitical forces and dynamics.
2727

2828

29-
Thus, Adam Tooze's account of the geopolitical precedents and antecedents of World War I begins by describing how Gross Domestic Products (GDP) of European Great Powers had evolved during the 70 years preceding 1914 (see chapter 1 of {cite}`Tooze_2014`).
29+
Thus, Adam Tooze's account of the geopolitical precedents and antecedents of World War I begins by describing how the Gross Domestic Products (GDP) of European Great Powers had evolved during the 70 years preceding 1914 (see chapter 1 of {cite}`Tooze_2014`).
3030

31-
Using the very same data that Tooze used to construct his figure, here is our version of his chapter 1 figure.
31+
Using the very same data that Tooze used to construct his figure (with a slightly longer timeline), here is our version of his chapter 1 figure.
3232

3333

3434
```{figure} _static/lecture_specific/long_run_growth/tooze_ch1_graph.png
3535
:width: 80%
3636
```
3737

38-
(This is just a copy of our figure {numref}`gdp1`. We desribe how we constructed it later in this lecture.)
38+
(This is just a copy of our figure {numref}`gdp1`. We describe how we constructed it later in this lecture.)
3939

40-
Chapter 1 of {cite}`Tooze_2014` used his graph to show how US GDP started the 19th century way behind the GDP of the British Empire.
40+
Chapter 1 of {cite}`Tooze_2014` used his graph to show how US GDP started the 19th century way behind the GDP of the British Empire.
4141

4242
By the end of the nineteenth century, US GDP had caught up with GDP of the British Empire, and how during the first half of the 20th century,
4343
US GDP surpassed that of the British Empire.
@@ -49,7 +49,7 @@ tempts one to want a counterpart to his graph for 2014 or later.
4949

5050
(An impatient reader seeking a hint at the answer might now want to jump ahead and look at figure {numref}`gdp2`.)
5151

52-
As we'll see, reasoning by analogy, this graph perhaps set the stage for an "XXX (21st) century", where you are free to fill in your guess for country XXX.
52+
As we'll see, reasoning by analogy, this graph perhaps set the stage for an "XXX (21st) century", where you are free to fill in your guess for country XXX.
5353

5454
As we gather data to construct those two graphs, we'll also study growth experiences for a number of countries for time horizons extending as far back as possible.
5555

@@ -62,7 +62,7 @@ While some countries have experienced long term rapid growth across that has las
6262
Since populations differ across countries and vary within a country over time, it will
6363
be interesting to describe both total GDP and GDP per capita as it evolves within a country.
6464

65-
First let's import the packages needed to explore what the data says about long run growth
65+
First let's import the packages needed to explore what the data says about long-run growth
6666

6767
```{code-cell} ipython3
6868
import pandas as pd
@@ -79,11 +79,11 @@ some dating back to the first century.
7979

8080
The data can be downloaded from the [Maddison Historical Statistics webpage](https://www.rug.nl/ggdc/historicaldevelopment/maddison/) by clicking on the "Latest Maddison Project Release".
8181

82-
We are going to read from a QuantEcon GitHub repository.
82+
We are going to read the data from a QuantEcon GitHub repository.
8383

84-
Our objective in this section is to produce a convenient `DataFrame` that contains per capita GDP for different countries.
84+
Our objective in this section is to produce a convenient `DataFrame` instance that contains per capita GDP for different countries.
8585

86-
Here we read the Maddison data into a pandas dataframe:
86+
Here we read the Maddison data into a pandas `DataFrame`:
8787

8888
```{code-cell} ipython3
8989
data_url = "https://github.com/QuantEcon/lecture-python-intro/raw/main/lectures/datasets/mpd2020.xlsx"
@@ -92,7 +92,7 @@ data = pd.read_excel(data_url,
9292
data.head()
9393
```
9494

95-
We can see that this dataset contains GDP per capita (gdppc) and population (pop) for many countries and years.
95+
We can see that this dataset contains GDP per capita (`gdppc`) and population (pop) for many countries and years.
9696

9797
Let's look at how many and which countries are available in this dataset
9898

@@ -125,7 +125,7 @@ code_to_name = data[
125125
['countrycode', 'country']].drop_duplicates().reset_index(drop=True).set_index(['countrycode'])
126126
```
127127

128-
Then we can quickly focus on GDP per capita (`gdppc`) and generate a wide data fromat
128+
Then we can quickly focus on GDP per capita (`gdppc`) and generate a wide data format
129129

130130
```{code-cell} ipython3
131131
gdp_pc = data.set_index(['countrycode', 'year'])['gdppc']
@@ -136,7 +136,7 @@ gdp_pc = gdp_pc.unstack('countrycode')
136136
gdp_pc.tail()
137137
```
138138

139-
We create a variale `color_mapping` to store a map between country codes and colors for consistency
139+
We create a variable `color_mapping` to store a map between country codes and colors for consistency
140140

141141
```{code-cell} ipython3
142142
:tags: [hide-input]
@@ -153,11 +153,11 @@ color_mapping = {country: color for
153153

154154
## GDP per capita
155155

156-
In this section we examine GDP per capita over the long run for serveral different countries.
156+
In this section we examine GDP per capita over the long run for several different countries.
157157

158158
### United Kingdom
159159

160-
First we examine United Kingdom GDP growth
160+
First we examine UK GDP growth
161161

162162
```{code-cell} ipython3
163163
---
@@ -178,7 +178,7 @@ gdp_pc[country].plot(
178178
```
179179

180180
:::{note}
181-
[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).
181+
[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 a given point in time. They are also known as Geary–Khamis dollars (GK Dollars).
182182
:::
183183

184184
We can see that the data is non-continuous for longer periods in the early 250 years of this millennium, so we could choose to interpolate to get a continuous line plot.
@@ -215,7 +215,7 @@ As a first step we create a function to generate plots for a list of countries
215215

216216
```{code-cell} ipython3
217217
def draw_interp_plots(series, # pandas series
218-
country, # contry code
218+
country, # list of country codes
219219
ylabel, # label for y-axis
220220
xlabel, # label for x-axis
221221
color_mapping, # code-color mapping
@@ -251,8 +251,6 @@ def draw_interp_plots(series, # pandas series
251251
ax.legend(loc='upper left', frameon=False)
252252
ax.set_ylabel(ylabel)
253253
ax.set_xlabel(xlabel)
254-
255-
return ax
256254
```
257255

258256
As you can see from this chart, economic growth started in earnest in the 18th century and continued for the next two hundred years.
@@ -275,10 +273,10 @@ Event = namedtuple('Event', ['year_range', 'y_text', 'text', 'color', 'ymax'])
275273
fig, ax = plt.subplots(dpi=300, figsize=(10, 6))
276274
277275
country = ['CHN', 'GBR', 'USA']
278-
ax = draw_interp_plots(gdp_pc[country].loc[1500:],
279-
country,
280-
'international dollars','year',
281-
color_mapping, code_to_name, 2, False, ax)
276+
draw_interp_plots(gdp_pc[country].loc[1500:],
277+
country,
278+
'international dollars','year',
279+
color_mapping, code_to_name, 2, False, ax)
282280
283281
# Define the parameters for the events and the text
284282
ylim = ax.get_ylim()[1]
@@ -327,10 +325,10 @@ draw_events(events, ax)
327325
plt.show()
328326
```
329327

330-
The preceding graph of per capita GDP strikingly reveals how the spread of the industrial revolution has over time gradually lifted the living standards of substantial
328+
The preceding graph of per capita GDP strikingly reveals how the spread of the Industrial Revolution has over time gradually lifted the living standards of substantial
331329
groups of people
332330

333-
- most of the growth happened in the past 150 years after the industrial revolution.
331+
- most of the growth happened in the past 150 years after the Industrial Revolution.
334332
- per capita GDP in the US and UK rose and diverged from that of China from 1820 to 1940.
335333
- the gap has closed rapidly after 1950 and especially after the late 1970s.
336334
- these outcomes reflect complicated combinations of technological and economic-policy factors that students of economic growth try to understand and quantify.
@@ -359,10 +357,10 @@ tags: [hide-input]
359357
fig, ax = plt.subplots(dpi=300, figsize=(10, 6))
360358
361359
country = ['CHN']
362-
ax = draw_interp_plots(gdp_pc[country].loc[1600:2000],
363-
country,
364-
'international dollars','year',
365-
color_mapping, code_to_name, 2, True, ax)
360+
draw_interp_plots(gdp_pc[country].loc[1600:2000],
361+
country,
362+
'international dollars','year',
363+
color_mapping, code_to_name, 2, True, ax)
366364
367365
ylim = ax.get_ylim()[1]
368366
@@ -404,7 +402,7 @@ Now we look at the United States (USA) and United Kingdom (GBR) in more detail.
404402

405403
In the following graph, please watch for
406404
- impact of trade policy (Navigation Act).
407-
- productivity changes brought by the industrial revolution.
405+
- productivity changes brought by the Industrial Revolution.
408406
- how the US gradually approaches and then surpasses the UK, setting the stage for the ''American Century''.
409407
- the often unanticipated consequences of wars.
410408
- interruptions and scars left by [business cycle](business_cycle) recessions and depressions.
@@ -420,10 +418,10 @@ tags: [hide-input]
420418
fig, ax = plt.subplots(dpi=300, figsize=(10, 6))
421419
422420
country = ['GBR', 'USA']
423-
ax = draw_interp_plots(gdp_pc[country].loc[1500:2000],
424-
country,
425-
'international dollars','year',
426-
color_mapping, code_to_name, 2, True, ax)
421+
draw_interp_plots(gdp_pc[country].loc[1500:2000],
422+
country,
423+
'international dollars','year',
424+
color_mapping, code_to_name, 2, True, ax)
427425
428426
ylim = ax.get_ylim()[1]
429427
@@ -493,14 +491,14 @@ mystnb:
493491
fig, ax = plt.subplots(dpi=300)
494492
country = ['CHN', 'SUN', 'JPN', 'GBR', 'USA']
495493
start_year, end_year = (1820, 1945)
496-
ax = draw_interp_plots(gdp[country].loc[start_year:end_year],
497-
country,
498-
'international dollars', 'year',
499-
color_mapping, code_to_name, 2, False, ax)
494+
draw_interp_plots(gdp[country].loc[start_year:end_year],
495+
country,
496+
'international dollars', 'year',
497+
color_mapping, code_to_name, 2, False, ax)
500498
```
501499

502500
#### Constructing a plot similar to Tooze's
503-
In this section we describe how we have constructed a version of the striking figure from chapter 1 of {cite}`Tooze_2014` that we discussed at the start of this lecture.
501+
In this section we describe how we have constructed a version of the striking figure from chapter 1 of {cite}`Tooze_2014` that we discussed at the start of this lecture.
504502

505503
Let's first define a collection of countries that consist of the British Empire (BEM) so we can replicate that series in Tooze's chart.
506504

@@ -525,10 +523,10 @@ code_to_name = pd.concat([code_to_name, bem])
525523
fig, ax = plt.subplots(dpi=300)
526524
country = ['DEU', 'USA', 'SUN', 'BEM', 'FRA', 'JPN']
527525
start_year, end_year = (1821, 1945)
528-
ax = draw_interp_plots(gdp[country].loc[start_year:end_year],
529-
country,
530-
'international dollars', 'year',
531-
color_mapping, code_to_name, 2, False, ax)
526+
draw_interp_plots(gdp[country].loc[start_year:end_year],
527+
country,
528+
'international dollars', 'year',
529+
color_mapping, code_to_name, 2, False, ax)
532530
533531
plt.savefig("./_static/lecture_specific/long_run_growth/tooze_ch1_graph.png", dpi=300,
534532
bbox_inches='tight')
@@ -556,19 +554,19 @@ mystnb:
556554
fig, ax = plt.subplots(dpi=300)
557555
country = ['CHN', 'SUN', 'JPN', 'GBR', 'USA']
558556
start_year, end_year = (1950, 2020)
559-
ax = draw_interp_plots(gdp[country].loc[start_year:end_year],
560-
country,
561-
'international dollars', 'year',
562-
color_mapping, code_to_name, 2, False, ax)
557+
draw_interp_plots(gdp[country].loc[start_year:end_year],
558+
country,
559+
'international dollars', 'year',
560+
color_mapping, code_to_name, 2, False, ax)
563561
```
564562

565563
It is tempting to compare this graph with figure {numref}`gdp1` that showed the US overtaking the UK near the start of the "American Century", a version of the graph featured in chapter 1 of {cite}`Tooze_2014`.
566564

567565
## Regional analysis
568566

569-
We often want to study historical experiences of countries outside the club of "World Powers".
567+
We often want to study the historical experiences of countries outside the club of "World Powers".
570568

571-
Fortunately, the [Maddison Historical Statistics](https://www.rug.nl/ggdc/historicaldevelopment/maddison/) dataset also includes regional aggregations
569+
The [Maddison Historical Statistics](https://www.rug.nl/ggdc/historicaldevelopment/maddison/) dataset also includes regional aggregations
572570

573571
```{code-cell} ipython3
574572
data = pd.read_excel(data_url,
@@ -591,9 +589,9 @@ Let's interpolate based on time to fill in any gaps in the dataset for the purpo
591589
regionalgdp_pc.interpolate(method='time', inplace=True)
592590
```
593591

594-
Looking more closely, let's compare the time series for `Western Offshoots` and `Sub-Saharan Africa` and more broadly at a number of different regions around the world.
592+
Looking more closely, let's compare the time series for `Western Offshoots` and `Sub-Saharan Africa` with a number of different regions around the world.
595593

596-
Again we see the divergence of the West from the rest of the world after the industrial revolution and the convergence of the world after the 1950s
594+
Again we see the divergence of the West from the rest of the world after the Industrial Revolution and the convergence of the world after the 1950s
597595

598596
```{code-cell} ipython3
599597
---
@@ -603,9 +601,9 @@ mystnb:
603601
name: region_gdppc
604602
---
605603
fig, ax = plt.subplots(dpi=300)
606-
ax = regionalgdp_pc.plot(ax=ax, xlabel='year',
607-
lw=2,
608-
ylabel='international dollars')
604+
regionalgdp_pc.plot(ax=ax, xlabel='year',
605+
lw=2,
606+
ylabel='international dollars')
609607
ax.set_yscale('log')
610608
plt.legend(loc='lower center',
611609
ncol=3, bbox_to_anchor=[0.5, -0.5])

0 commit comments

Comments
 (0)