Skip to content

Commit 908a747

Browse files
authored
Merge pull request #226 from QuantEcon/js_lrg_edits
Small edits to LRG
2 parents cb80f09 + fee0edc commit 908a747

File tree

1 file changed

+9
-25
lines changed

1 file changed

+9
-25
lines changed

lectures/long_run_growth.md

Lines changed: 9 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ kernelspec:
1111
name: python3
1212
---
1313

14-
+++ {"user_expressions": []}
1514

1615
# Economic Growth Evidence
1716

@@ -52,25 +51,20 @@ from matplotlib.lines import Line2D
5251

5352
## Setting up
5453

55-
A project initiated by [Angus Maddison](https://en.wikipedia.org/wiki/Angus_Maddison) has collected many historical time series that study economic growth.
54+
A project initiated by [Angus Maddison](https://en.wikipedia.org/wiki/Angus_Maddison) has collected many historical time series related to economic growth,
55+
some dating back to the first century.
5656

57-
We can use the [Maddison Historical Statistics](https://www.rug.nl/ggdc/historicaldevelopment/maddison/) to look at many different countries, including some countries dating back to the first century.
57+
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".
5858

59-
```{tip}
60-
The data can be downloaded from [this webpage](https://www.rug.nl/ggdc/historicaldevelopment/maddison/) by clicking on the `Latest Maddison Project Release`.
59+
For convenience, here is a copy of the 2020 data {download}`in Excel format <datasets/mpd2020.xlsx>`.
6160

62-
Here we use the [Maddison Project Database 2020](https://www.rug.nl/ggdc/historicaldevelopment/maddison/releases/maddison-project-database-2020) in `Excel` format.
63-
```
64-
65-
If you don't want to fetch the data file from [Maddison Historical Statistics](https://www.rug.nl/ggdc/historicaldevelopment/maddison/) you can download the file directly {download}`datasets/mpd2020.xlsx`.
61+
Let's read it into a pandas dataframe:
6662

6763
```{code-cell} ipython3
6864
data = pd.read_excel("datasets/mpd2020.xlsx", sheet_name='Full data')
6965
data
7066
```
7167

72-
+++ {"user_expressions": []}
73-
7468
We can see that this dataset contains GDP per capita (gdppc) and population (pop) for many countries and years.
7569

7670
Let's look at how many and which countries are available in this dataset
@@ -79,7 +73,6 @@ Let's look at how many and which countries are available in this dataset
7973
len(data.country.unique())
8074
```
8175

82-
+++ {"user_expressions": []}
8376

8477
We can now explore some of the 169 countries that are available.
8578

@@ -95,7 +88,6 @@ cntry_years = pd.DataFrame(cntry_years, columns=['country', 'Min Year', 'Max Yea
9588
cntry_years
9689
```
9790

98-
+++ {"user_expressions": []}
9991

10092
Let's now reshape the original data into some convenient variables to enable quicker access to countries time series data.
10193

@@ -105,7 +97,6 @@ We can build a useful mapping between country code's and country names in this d
10597
code_to_name = data[['countrycode','country']].drop_duplicates().reset_index(drop=True).set_index(['countrycode'])
10698
```
10799

108-
+++ {"user_expressions": []}
109100

110101
Then we can quickly focus on GDP per capita (gdp)
111102

@@ -122,9 +113,10 @@ gdppc = gdppc.unstack('countrycode')
122113
gdppc
123114
```
124115

125-
Now we create a color mapping between country codes and colors for consistency
116+
We create a color mapping between country codes and colors for consistency
126117

127118
```{code-cell} ipython3
119+
:tags: [hide-input]
128120
country_names = data['countrycode']
129121
130122
# Generate a colormap with the number of colors matching the number of countries
@@ -134,7 +126,7 @@ colors = cm.Dark2(np.linspace(0, 0.8, len(country_names)))
134126
color_mapping = {country: color for country, color in zip(country_names, colors)}
135127
```
136128

137-
+++ {"user_expressions": []}
129+
## GPD Plots
138130

139131
Looking at the United Kingdom we can first confirm we are using the correct country code
140132

@@ -156,7 +148,6 @@ _ = gdppc[cntry].plot(
156148
color=color_mapping['GBR'])
157149
```
158150

159-
+++ {"user_expressions": []}
160151

161152
:::{note}
162153
[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).
@@ -189,7 +180,6 @@ ax.set_xlabel('Year')
189180
plt.show()
190181
```
191182

192-
+++ {"user_expressions": []}
193183

194184
We can now put this into a function to generate plots for a list of countries
195185

@@ -227,9 +217,8 @@ def draw_interp_plots(series, ylabel, xlabel, color_mapping, code_to_name, lw, l
227217
return ax
228218
```
229219

230-
+++ {"user_expressions": []}
231220

232-
As you can see from this chart economic growth started in earnest in the 18th century and continued for the next two hundred years.
221+
As you can see from this chart, economic growth started in earnest in the 18th century and continued for the next two hundred years.
233222

234223
How does this compare with other countries' growth trajectories?
235224

@@ -301,7 +290,6 @@ draw_events(events, ax)
301290
plt.show()
302291
```
303292

304-
+++ {"user_expressions": []}
305293

306294
The preceding graph of percapita GDP strikingly reveals how the spread of the industrial revolution has over time gradually lifted the living standards of substantial
307295
groups of people
@@ -311,7 +299,6 @@ groups of people
311299
- The gap has closed rapidly after 1950 and especially after the late 1970s.
312300
- These outcomes reflect complicated combinations of technological and economic-policy factors that students of economic growth try to understand and quantify
313301

314-
+++ {"user_expressions": []}
315302

316303
It is fascinating to see China's GDP per capita levels from 1500 through to the 1970s.
317304

@@ -432,7 +419,6 @@ draw_events(events, ax)
432419
plt.show()
433420
```
434421

435-
+++ {"user_expressions": []}
436422

437423
## The industrialized world
438424

@@ -447,8 +433,6 @@ data['gdp'] = data['gdppc'] * data['pop']
447433
gdp = data['gdp'].unstack('countrycode')
448434
```
449435

450-
+++ {"user_expressions": []}
451-
452436
### Early industralization (1820 to 1940)
453437

454438
We first visualize the trend of China, the Former Soviet Union, Japan, the UK and the US.

0 commit comments

Comments
 (0)