GitHub

@@ -15,11 +15,11 @@ kernelspec:

15151616

## Overview

171718-

This lecture is about illustrateing business cycles in different countries and period.

18+

This lecture is about illustrating business cycles in different countries and period.

19192020

The business cycle refers to the fluctuations in economic activity over time. These fluctuations can be observed in the form of expansions, contractions, recessions, and recoveries in the economy.

212122-

In this lecture, we will see expensions and contractions of economies from 1960s to the recent pandemic using [World Bank API](https://documents.worldbank.org/en/publication/documents-reports/api).

22+

In this lecture, we will see expansions and contractions of economies from 1960s to the recent pandemic using [World Bank API](https://documents.worldbank.org/en/publication/documents-reports/api).

23232424

In addition to what's in Anaconda, this lecture will need the following libraries to get World bank data

2525

@@ -49,7 +49,7 @@ So let's explore how to query data together.

49495050

We can use `wb.series.info` with parameter `q` to query available data from the World Bank (`imfpy. searches.database_codes()` in `imfpy`)

515152-

For example, GDP growth is a key indicator to show the expension and contraction of level of economic activities.

52+

For example, GDP growth is a key indicator to show the expansion and contraction of level of economic activities.

53535454

Let's retrive GDP growth data together

5555

@@ -97,7 +97,7 @@ wb.series.info(q='consumption')

9797

wb.series.info(q='capital account') # TODO: Check if it is to be plotted

9898

```

9999100-

- international trade volumn

100+

- international trade volume

101101102102

+++

103103

@@ -342,7 +342,7 @@ def plot_trade(data, title, ylabel, title_pos, ax, g_params, b_params, t_params)

342342343343344344

fig, ax = plt.subplots()

345-

title = 'United States (International Trade Volumn)'

345+

title = 'United States (International Trade Volume)'

346346

ylabel = 'US Dollars, Millions'

347347

plot_UStrade = plot_trade(trade_us[['Period', 'Twoway Trade']], title, ylabel, 0.05, ax, g_params, b_params, t_params)

348348

```

@@ -352,7 +352,7 @@ fig, ax = plt.subplots()

352352

trade_cn = dots('CN','W00', 1960, 2020, freq='A')

353353354354

trade_cn['Period'] = trade_cn['Period'].astype('int')

355-

title = 'China (International Trade Volumn)'

355+

title = 'China (International Trade Volume)'

356356

ylabel = 'US Dollars, Millions'

357357

plot_trade_cn = plot_trade(trade_cn[['Period', 'Twoway Trade']], title, ylabel, 0.05, ax, g_params, b_params, t_params)

358358

```

@@ -362,7 +362,7 @@ fig, ax = plt.subplots()

362362

trade_mx = dots('MX','W00', 1960, 2020, freq='A')

363363364364

trade_mx['Period'] = trade_mx['Period'].astype('int')

365-

title = 'Mexico (International Trade Volumn)'

365+

title = 'Mexico (International Trade Volume)'

366366

ylabel = 'US Dollars, Millions'

367367

plot_trade_mx = plot_trade(trade_mx[['Period', 'Twoway Trade']], title, ylabel, 0.05, ax, g_params, b_params, t_params)

368368

```

@@ -372,7 +372,7 @@ fig, ax = plt.subplots()

372372

trade_ar = dots('AR','W00', 1960, 2020, freq='A')

373373374374

trade_ar['Period'] = trade_ar['Period'].astype('int')

375-

title = 'Argentina (International Trade Volumn)'

375+

title = 'Argentina (International Trade Volume)'

376376

ylabel = 'US Dollars, Millions'

377377

plot_trade_ar = plot_trade(trade_ar[['Period', 'Twoway Trade']], title, ylabel, 0.05, ax, g_params, b_params, t_params)

378378

```

Read the original on github.com ↗