Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding english-monarchs-and-marriages (enmoma) dataset #721

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ If you are using TidyTuesday to teach data-related skills, [please let us know](
| 31 | `2024-07-30` | [Summer Movies](data/2024/2024-07-30/readme.md) | [IMDb non-commercial datasets](https://developer.imdb.com/non-commercial-datasets/) | [IMDb's 2023 Summer Movie Guide](https://www.imdb.com/list/ls569932833) |
| 32 | `2024-08-06` | [Olympic Medals](data/2024/2024-08-06/readme.md) | [Kaggle Olypmic history data](https://www.kaggle.com/heesoo37/120-years-of-olympic-history-athletes-and-results) | [Financial Times Tokyo Olypmics analysis](https://ig.ft.com/tokyo-olympics-alternative-medal-table/) |
| 33 | `2024-08-13` | [World's Fairs](data/2024/2024-08-13/readme.md) | [List of world expositions (Wikipedia)](https://en.wikipedia.org/wiki/List_of_world_expositions) | [World's fair (Wikipedia)](https://en.wikipedia.org/wiki/World%27s_fair) |
| 34 | `2024-08-20` | [English Monarchs and Marriages](data/2024/2024-08-20/readme.md) | [A list of Monarchs by marriage](https://www.ianvisits.co.uk/articles/a-list-of-monarchs-by-marriage-6857/) | [monarchs and marriages](github.com/frankiethull/english_monarch_marriages) |

***

Expand Down
90 changes: 90 additions & 0 deletions data/2024/2024-08-20/english_monarchs_marriages_df.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
king_name,king_age,consort_name,consort_age,year_of_marriage
Æthelwulf,?,Osburh,?,851(?)
Æthelwulf,50(?),Judith of Flanders,12,856
Æthelbald,24,Judith of Flanders,14,858
Æthelberht,–,–,–,–
Æthelred,?,Wulfthryth?,?,?
Alfred the Great,19,Ealhswith,16,868
Edward the Elder,19,Ecgwynn,?,893
Edward the Elder,28,Aelffaed,?,902
Edward the Elder,31,Eadgifu of Kent,?,905
Æthelstan,–,–,–,–
"Edmund
the Magnificent",,Ælfgifu of Shaftesbury,–,–
"Edmund
the Magnificent",22,Æthelflæd of Damerham,?,944
Eadred,–,–,–,–
Eadwig,,Ælfgifu,?,955(?)
Edgar the Peaceful,17,Æthelflæd,?,960
Edgar the Peaceful,21,Ælfthryth,19,964
Edward the Martyr,–,–,–,–
Æthelred the Unready,23,Ælfgifu of York,21,991
Æthelred the Unready,34,Emma of Normandy,17,1002
"Sweyn
Forkbeard",,Gunhild of Wenden,?,990
"Sweyn
Forkbeard",,Sigrid the Haughty,?,1000
"Edmund
Ironside",,Edith of East Anglia,?,?
Cnut,18,Aelfgifu of Northampton,?,1013(?)
Cnut,22,Emma of Normandy,?,1017
"Harold
Harefoot",,Ælfgifu,?,?
Harthacnut,–,–,–,–
Edward the Confessor,42,Edith of Wessex,20,1045
Harold Godwinson,24,Edith Swannesha,19,1044(?)
Harold Godwinson,42,Ealdgyth,?,1064
William I,25,Matilda of Flanders,22,1053
William II,–,–,–,–
Henry I,32,Matilda of Scotland,20,1100
Henry I,53,Adeliza of Louvain,18,1121
Stephen,29,Matilda of Boulogne,20,1125
Henry II,19,Eleanor of Aquitaine,30,1152
Henry the Young King,5,Margaret of France,3,1160
Richard I,34,Berengaria of Navarre,26,1191
John,23,Isabel of Gloucester,16,1189
John,34,Isabella of Angoulême,12,1200
Henry III,29,Eleanor of Provence,13,1236
Edward I,15,Eleanor of Castile,13,1254
Edward I,60,Margaret of France,20,1299
Edward II,24,Isabella of France,13,1308
Edward III,16,Philippa of Hainault,14,1328
Richard II,15,Anne of Bohemia,16,1382
Richard II,29,Isabella of Valois,7,1396
Henry IV,14,Mary de Bohun,12,1380
Henry IV,37,Joanna of Navarre,33,1403
Henry V,34,Catherine of Valois,19,1420
Henry VI,24,Margaret of Anjou,15,1445
Edward IV,22,Elizabeth Woodville,27,1464
Edward V,–,–,–,–
Richard III,20,Anne Neville,16,1472
Henry VII,29,Elizabeth of York,20,1486
Henry VIII,18,Catherine of Aragon,24,1509
Henry VIII,42,Anne Boleyn,32,1533
Henry VIII,45,Jane Seymour,28,1536
Henry VIII,49,Anne of Cleves,25,1540
Henry VIII,49,Catherine Howard,19,1540
Henry VIII,52,Catherine Parr,31,1543
Edward VI,–,–,–,–
Mary I,38,Philip II of Spain,27,1554
Elizabeth I,–,–,–,–
James I,23,Anne of Denmark,15,1589
Charles I,25,Henrietta Maria of France,16,1625
Charles II,32,Catherine of Braganza,24,1662
James II,27,Anne Hyde,22,1660
James II,40,Mary of Modena,15,1673
Mary II,15,William III,27,1677
William III,27,Mary II,15,1677
Anne,18,George of Denmark,30,1683
George I,22,Sophia Dorothea of Brunswick-Lueneburg-Celle,16,1682
George II,22,Caroline of Ansbach,22,1705
George III,23,Charlotte of Mecklenburg-Strelitz,17,1761
George IV,23,Maria Anne Fitzherbert,29,1785
George IV,33,Caroline of Brunswick,27,1795
William IV,53,Adelaide of Saxe-Meiningen,26,1818
Victoria,21,Albert of Saxe-Coburg and Gotha,21,1840
Edward VII,22,Alexandra of Denmark,19,1863
George V,28,Mary of Teck,26,1893
Edward VIII,43,Wallis Warfield Simpson,41,1937
George VI,28,Elizabeth Bowes-Lyon,23,1923
Elizabeth II,21,Philip of Greece and Denmark,26,1947
Binary file added data/2024/2024-08-20/gg_enmoma.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions data/2024/2024-08-20/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
title: English Monarchs and Marriages
article:
title: monarchs and marriages
url: github.com/frankiethull/english_monarch_marriages
data_source:
title: A list of Monarchs by marriage
url: https://www.ianvisits.co.uk/articles/a-list-of-monarchs-by-marriage-6857/
images:
# Please include at least one image, and up to three images
- file: gg_enmoma.png
alt: Chart showing the relationship between the year of marriage and the age of king/consort. The x-axis lists the years and the y-axis represents the age range. The chart indicates that the average age of marriage for a consort being much lower than king's age
63 changes: 63 additions & 0 deletions data/2024/2024-08-20/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# English Monarchs and Marriages

This week we are exploring [English Monarchs and Marriages](https://github.com/frankiethull/english_monarch_marriages)!

> this dataset focuses on the names, ages, and marriages of various 'kings' and 'consorts'. the data ranges all the way back to 850 where the details are a bit fuzzy, spanning all the way to current day. names contain special characters; ages & years can be a bit of a regex puzzle as well. additionally, the age of kings and consorts may show quite a bit of an age gap.

The data was scraped from [Ian Visits](https://www.ianvisits.co.uk/articles/a-list-of-monarchs-by-marriage-6857/) by [f. hull](https://github.com/frankiethull), who also curated this week's post!

## The Data

```r
# Option 1: tidytuesdayR package
## install.packages("tidytuesdayR")

tuesdata <- tidytuesdayR::tt_load('2024-08-20')
## OR
tuesdata <- tidytuesdayR::tt_load(2024, week = 34)

english_monarchs_marriages_df <- tuesdata$english_monarchs_marriages_df

# Option 2: Read directly from GitHub

english_monarchs_marriages_df <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2024/2024-08-20/english_monarchs_marriages_df.csv')
```

## How to Participate

- [Explore the data](https://r4ds.hadley.nz/), watching out for interesting relationships. We would like to emphasize that you should not draw conclusions about **causation** in the data. There are various moderating variables that affect all data, many of which might not have been captured in these datasets. As such, our suggestion is to use the data provided to practice your data tidying and plotting techniques, and to consider for yourself what nuances might underlie these relationships.
- Create a visualization, a model, a [shiny app](https://shiny.posit.co/), or some other piece of data-science-related output, using R or another programming language.
- [Share your output and the code used to generate it](../../../sharing.md) on social media with the #TidyTuesday hashtag.

### Data Dictionary

# `english_monarchs_marriages_df.csv`

|variable |class |description |
|:----------------|:---------|:----------------|
|king_name |character |male or female ruler |
|king_age |character |ruler's age |
|consort_name |character |consort chosen to marry king |
|consort_age |character |age of consort |
|year_of_marriage |character |historical year of marriage |

### Cleaning Script

```r
library(rvest)

# url to scrape:
root <- "https://www.ianvisits.co.uk/articles/a-list-of-monarchs-by-marriage-6857/"

# get table
tables <- read_html(root) |> html_nodes("table")
df <- tables[1] |> html_table() |> as.data.frame()

df <- df[, -6] # remove spoiler
df <- df[-c(1,2), ] # remove double-header effect

cols <- c("king_name", "king_age", "consort_name", "consort_age", "year_of_marriage")
colnames(df) <- cols

english_monarchs_marriages_df <- df
```
1 change: 1 addition & 0 deletions data/2024/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ Archive of datasets and articles from the 2024 series of `#TidyTuesday` events.
| 31 | `2024-07-30` | [Summer Movies](2024-07-30/readme.md) | [IMDb non-commercial datasets](https://developer.imdb.com/non-commercial-datasets/) | [IMDb's 2023 Summer Movie Guide](https://www.imdb.com/list/ls569932833) |
| 32 | `2024-08-06` | [Olympic Medals](2024-08-06/readme.md) | [Kaggle Olypmic history data](https://www.kaggle.com/heesoo37/120-years-of-olympic-history-athletes-and-results) | [Financial Times Tokyo Olypmics analysis](https://ig.ft.com/tokyo-olympics-alternative-medal-table/) |
| 33 | `2024-08-13` | [World's Fairs](2024-08-13/readme.md) | [List of world expositions (Wikipedia)](https://en.wikipedia.org/wiki/List_of_world_expositions) | [World's fair (Wikipedia)](https://en.wikipedia.org/wiki/World%27s_fair) |
| 34 | `2024-08-20` | [English Monarchs and Marriages](2024-08-20/readme.md) | [A list of Monarchs by marriage](https://www.ianvisits.co.uk/articles/a-list-of-monarchs-by-marriage-6857/) | [monarchs and marriages](github.com/frankiethull/english_monarch_marriages) |
1 change: 1 addition & 0 deletions static/tt_data_type.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Week,Date,year,data_files,data_type,delim
34,2024-08-20,2024,english_monarchs_marriages_df.csv,csv,","
33,2024-08-13,2024,worlds_fairs.csv,csv,","
32,2024-08-06,2024,olympics.csv,csv,","
31,2024-07-30,2024,summer_movie_genres.csv,csv,","
Expand Down