---
title: "Industrial Revolution began in 1689 or 1649?"
author: "Spencer Graves"
date: "`r Sys.Date()`"
output: rmarkdown::html_vignette
#output: rmarkdown::word_document
# output: word_document
vignette: >
  %\VignetteIndexEntry{IndustrialRevolution}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

## Abstract

Acemoglu and Robinson (2012) say that the Industrial Revolution began in England following the English Bill of Rights of 1689. Maddison Project data suggest that it began close to 40 years earlier when the English chopped the head off of [King Charles I](https://en.wikipedia.org/wiki/Charles_I_of_England) for abuse of power as discussed in this brief note,. 

## Introduction  

The [`MaddisonData`](https://github.com/sbgraves237/MaddisonData) package for R includes a [`ggplotPath`](https://github.com/sbgraves237/MaddisonData/blob/main/man/ggplotPath.Rd) function that makes it easy to plot [Maddison project data](https://www.rug.nl/ggdc/historicaldevelopment/maddison/?lang=en) for any country or group of countries plus a  [`getMaddisonSources`](https://github.com/sbgraves237/MaddisonData/blob/main/man/getMaddisonSources.Rd) function that makes it easy to get the citations required for publication of such a plot. We illustrate that here applied to England / Great Britain / the United Kingdom, whose 3-letter ISO code is `GBR`. We select that, because it suggests that the [Industrial Revolution](https://en.wikipedia.org/wiki/Industrial_Revolution) began in England close to 1649, when the English chopped the head off their [King Charles I](https://en.wikipedia.org/wiki/Charles_I_of_England) for abuse of power, 40 years earlier than the English Bill of Rights, which Acemoglu and Robinson (2012) claim started the Industrial Revolution 

## World leader in `GDPpc` by year

Let's compute the world leader in `gdppc` for each year in MaddisonData. 

```{r leaders}
library(MaddisonData)

Leaders0 <- MaddisonData::MaddisonLeaders()
Leaders00 <- table(Leaders0$ISO)
MaddisonData::MaddisonCountries[names(Leaders00), 1:2]
```

Let's redo this without countries like `ARE`, `KWT`, and `QAT` that seem NOT to have been technology leaders. 

```{r leaders1}
Leaders1 <- MaddisonData::MaddisonLeaders(c('ARE', 'KWT', 'QAT'))
Leaders10 <- table(Leaders1$ISO)
MaddisonData::MaddisonCountries[names(Leaders10), 1:2]
```

Let's plot.  

## Plot

```{r plotMad}
#library(MaddisonData)

Leaders10d <- subset(MaddisonData, ISO %in% names(Leaders10))
plotLeaders1 <- MaddisonData::ggplotPath(y='gdppc', group='ISO', 
                        data=Leaders10d, scaley=1000)

plotLeaders1
plotLeaders1 + ggplot2::xlim(1200, 2022)
```

`MaddisonSources` for all 15 leaders? 

```{r MadSources}
MadSources15 <- MaddisonData::getMaddisonSources(names(Leaders10))
head(MadSources15)
```

How long was each country the leader? 

```{r plotDur}
plot(yearEnd-yearBegin+1~yearBegin, Leaders1, log='y', las=1)

Leaders1$dYrs0 <- with(Leaders1, yearEnd-yearBegin+1)
Leaders1$dYrs1 <- c(tail(Leaders1$yearBegin, -1) - head(Leaders1$yearEnd, -1),
                    NA)
Leaders1
tail(Leaders1)
```

```{r plotMad1600}
MadDat1600 <- subset(MaddisonData::MaddisonData, year>1600)
Leaders1600 <- MaddisonData::MaddisonLeaders(c('ARE', 'KWT', 'QAT'), 
                               data=MadDat1600)

table(Leaders1600$ISO)

Leaders1600d <- subset(MaddisonData, ISO %in% names(table(Leaders1600$ISO)))
plotLeaders1600 <- MaddisonData::ggplotPath(y='gdppc', group='ISO', 
                        data=Leaders1600d, scaley=1000)
  
plotLeaders1600 + ggplot2::xlim(1601, 2022)
```

Are the three lines before 1800 `NLD`, `GBR`, and `USA`? 

```{r NLD_GBR_USA}

NLD_GBR_USAd <- subset(MaddisonData, ISO %in% c("NLD", 'GBR', 'USA'))

NLD_GBR_USA <- ggplotPath(y='gdppc', group='ISO', 
                        data=NLD_GBR_USAd, scaley=1000)

NLD_GBR_USA + ggplot2::xlim(1301, 2022)
NLD_GBR_USA + ggplot2::xlim(1601, 2022)
```

The first two observations in these data are for 1000 and 1252. The two biggest events in that period are the Norman Conquest and the `Magna Carta`. Dates are conveniently given in the Wikipedia article on ["Timeline of English history"](https://en.wikipedia.org/wiki/Timeline_of_English_history). 

```{r UKevents1, eval=FALSE}
UKevents1 <- matrix(c(
  "1066-10-14", "Norman Conquest", 
  '1215-06-16', 'Magna Carta' 
), ncol=2)
```

Let's zoom in on 1250 to 1350. 

```{r 1250_1350, eval=FALSE}
GBRgdppc + ggplot2::coord_cartesian(xlim=c(1250, 1350), ylim=c(0.9, 2)) 
```

`GDPpc` declines from 1252 to around 1290 then rebounds until around 1300, when it mostly stops growing until around 1349, the year after the [Black Death](https://en.wikipedia.org/wiki/Black_Death) arrived in England. 

```{r UKevents2, eval=FALSE}
UKevents2 <- rbind(UKevents1, 
  c("1348-06", "Black Death") )

GBR <- subset(MaddisonData, (ISO == 'GBR') & (1347<year) & (year<1451))
(GBRpop <- 
    
    
    plotMaddison('GBR', 'pop'))



head(GBRpop@data)
```

The first three years for which the Maddison project has data on population are 1, 1000, and 1500. The Wikipedia article on the [Black Death](https://en.wikipedia.org/wiki/Black_Death) quotes [Geoffrey the Baker](https://en.wikipedia.org/wiki/Geoffrey_the_Baker) as having written in 1350, "The seventh year after it began, it came to England ... . [It] so wasted the people that scarce the tenth person of any sort was left alive." Clearly, no such population crash appears in these data. 

```{r 1300_1700, eval=FALSE}
GBRgdppc + ggplot2::coord_cartesian(xlim=c(1300, 1700), ylim=c(0.98, 2.7)) 
```

`GDPpc` grew until around 1390 and then was mostly flat until 1649. 

```{r 1380_1400, eval=FALSE}
GBRgdppc + ggplot2::coord_cartesian(xlim=c(1380, 1400), ylim=c(1.5, 2)) 
```

I don't know what happened around 1390. Richard II ruled from 1377 to 1399. The British economy was stagnant until close to the time that King Charles I was beheaded 1649-01-30. 

Let's zoom on on various parts of this history. 

```{r 1640_1700, eval=FALSE}
GBRgdppc + ggplot2::coord_cartesian(xlim=c(1640, 1700), ylim=c(1.5, 3)) 
GBRgdppc + ggplot2::coord_cartesian(xlim=c(1640, 1730), ylim=c(1.5, 3)) 
GBRgdppc + ggplot2::coord_cartesian(xlim=c(1640, 1920), ylim=c(1.5, 9)) 
GBRgdppc + ggplot2::coord_cartesian(xlim=c(1900, 2022), ylim=c(6, 40)) 
GBRgdppc + ggplot2::coord_cartesian(xlim=c(2000, 2022), ylim=c(30, 40)) 
```



```{r UKevents3, eval=FALSE}
UKevents3 <- rbind(UKevents2, 
  c("1377-06-21", "King Richard II"), 
  c('1399-09-40', 'King Henry IV'), 
  c('1413-03-21', 'King Henry V'), 
  c('1422-09-01', 'King Henry VI'), 
  c('1461-03-04', 'King Edward IV'), 
  c('1483-04-09', 'King Edward V'), 
  c('1483-06-26', 'King Richard III'), 
  c('1485-08-22', 'House of Tudor'), 
  c('1603-03-24', 'King James I'), 
  c('1625-03-27', 'King Charles I'), 
  c('1649-02-14', 'Lord Protector Oliver Cromwell'), 
  c('1658-09-03', 'Lord Protector Richard Cromwell'), 
  c('1660-05-29', 'King Charles II'), 
  c('1685-02-06', 'King James II'), 
  c('1689-01-01', 'William and Mary'), 
  c('1702-03-01', 'Queene Ann'), 
  c('1714-08-01', 'King George I'), 
  c('1722-06-22', 'King George II'), 
  c('1760-10-25', 'King George III'), 
  c('1820-01-29', 'King George IV'), 
  c('1830-06-29', 'King William IV'), 
  c('1837-06-20', 'Queen Victoria'), 
  c('1901-01-22', 'King Edward VII'), 
  c('1910-05-06', 'King George V'), 
  c('1936-01-20', 'King Edward VIII'), 
  c('1936-12-11', 'King George VI'), 
  c('1952-02-06', 'Queen Elizabeth II'), 
  c('1997-05-02', 'PM Tony Blair'), 
  c('2007-06-27', 'PM Gordon Brown'), 
  c('2010-05-11', 'PM David Cameron'),
  c('2016-07-13', 'PM Theresa May'), 
  c('2019-07-22', 'PM Boris Johnson'), 
  c('2022-09-06', 'PM Liz Truss') 
  )
```




## Maddison sources

Let's get the sources that the Maddison Project says we should cite if we want to publish a plot like this: 

```{r MadSources2, eval=FALSE}
(GBRsources <- MaddisonData::getMaddisonSources('GBR'))
# the print method for a tibble does not print all; 
# convert to a data.frame: 
as.data.frame(GBRsources)
```

Before we publish a plot like this we want to annotate it with major events, especially transitions in head of state ... 

## Bibliography 

Acemoglu and Robinson (2012) *Why Nations Fail* (Crown) 

Broadberry, S.N., B. Campbell, A. Klein, M. Overton and B. van Leeuwen (2015), *British Economic Growth 1270-1870* (Cambridge: Cambridge University Press) for England 1252-1700 and for Great Britain 1700-1870. 

Conference Board: Total Economy Database (TED) for GDP `pc` since 2008 and population since 1990. 

Scheidel, W. and Friesen, S. J., 'The size of the economy and the distribution of income in the Roman Empire', Journal of Roman Studies, 99 (2009, pp. 61–91) for the population at year 1. 
