---
title: "Temple Data Sealings"
output: html_document
---

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

# Introduction

President Hinckley has had a significant impact on temples in our history.  Note the following two sections from [The Teachings of President Hinckley](https://www.lds.org/manual/teachings-of-presidents-of-the-church-gordon-b-hinckley?lang=eng)

> The inspiration for this plan had begun more than 20 years earlier, when President Hinckley was serving as chairman of the Church’s Temple Committee. Concerned that many Latter-day Saints did not have easy access to temple blessings, he wrote in his journal, *“The Church could build [many smaller] temples for the cost of the Washington Temple [then under construction]. It would take the temples to the people instead of having the people travel great distances to get to them.”*[3](https://www.lds.org/manual/teachings-of-presidents-of-the-church-gordon-b-hinckley/chapter-23-the-blessings-of-the-holy-temple?lang=eng)

> In 1997 a revelation from the Lord brought this idea to life. President Hinckley shared something about that revelation when he offered the dedicatory prayer for the Colonia Juárez Chihuahua Mexico Temple. *“It was here in Northern Mexico,” he prayed, “that Thou didst reveal the idea and the plan of a smaller temple, complete in every necessary detail, but suited in size to the needs and circumstances of the Church membership in this area of Thy vineyard.* That revelation came of a desire and a prayer to help Thy people of these colonies who have been true and loyal.”[4](https://www.lds.org/manual/teachings-of-presidents-of-the-church-gordon-b-hinckley/chapter-23-the-blessings-of-the-holy-temple?lang=eng)

You can read more about the development of smaller temples [here](https://rsc.byu.edu/archived/colonia-ju-rez-temple-prophet-s-inspiration/president-hinckleys-revelation-and-recent#_edn1).

# Our goal

**What visualizations could we make to help us understand the evolution of temple sizes since the organization of the church as it relates to President Hinckley?**

# Details

The [ldschurchtemples.org](http://ldschurchtemples.org/) has some nice data on LDS temples.  We will be using the following webpages to get size and timelines.

* [dimensions](https://churchofjesuschristtemples.org/statistics/dimensions/){target="blank"}
* [timelines](https://churchofjesuschristtemples.org/maps/kml/timeline/){target="blank"}

You can get the `.Rmd` file this [this link](temple_sealings.Rmd)

## Loading my R packages

```{r, packages}
# http://bradleyboehmke.github.io/2015/12/scraping-html-tables.html
# https://selectorgadget.com/
pacman::p_load(tidyverse, sf, ggrepel, rvest, lubridate)

```

## Reading in raw data

```{r, loadingdata, eval=FALSE}

temple_locs <- read_csv("https://churchofjesuschristtemples.org/maps/gps/", locale = locale(encoding = "latin1"))
temple_geometry <- st_read("https://churchofjesuschristtemples.org/maps/kml/timeline/")
temple_size <- "https://churchofjesuschristtemples.org/statistics/dimensions/" %>% read_html() %>% html_nodes("table") %>% html_table() %>% .[[1]]
temple_time <- "https://churchofjesuschristtemples.org/statistics/milestones/" %>% read_html() %>% html_nodes("table") %>% html_table() %>% .[[1]]



```

## Some Hints

1. Merge all three data sets into one table.
2. Create visualizations that highlight our temple history.

