Skip to content

Commit

Permalink
version 0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
JJ authored and cran-robot committed Aug 21, 2023
1 parent 337f271 commit fe97f94
Show file tree
Hide file tree
Showing 31 changed files with 859 additions and 132 deletions.
9 changes: 5 additions & 4 deletions DESCRIPTION
@@ -1,7 +1,7 @@
Package: dogesr
Type: Package
Title: Work with the Doges/Dogaresse Dataset
Version: 0.4.0
Version: 0.5.0
Author: Juan Julián Merelo-Guervós
Maintainer: Juan Julián Merelo-Guervós <jjmerelo@gmail.com>
Description: Work with data on Venetian doges and dogaresse and the noble families of the Republic of Venice, and use it for social network analysis, as used in Merelo (2022) <arXiv:2209.07334>.
Expand All @@ -11,11 +11,12 @@ LazyData: true
Depends: R (>= 3.5.0)
Suggests: testthat (>= 3.0.0), devtools, tidyr, networkD3, tibble
Config/testthat/edition: 3
Imports: Rdpack, dplyr, ggplot2, knitr, igraph, qpdf, rmarkdown
Imports: Rdpack, dplyr, ggplot2, ggthemes, knitr, igraph, qpdf,
rmarkdown
VignetteBuilder: knitr
RdMacros: Rdpack
RoxygenNote: 7.2.1
NeedsCompilation: no
Packaged: 2023-06-15 10:09:39 UTC; jmerelo
Packaged: 2023-08-21 11:23:17 UTC; jmerelo
Repository: CRAN
Date/Publication: 2023-06-15 10:50:02 UTC
Date/Publication: 2023-08-21 11:40:05 UTC
54 changes: 30 additions & 24 deletions MD5
@@ -1,49 +1,55 @@
72bf3da7a72ebe1a398e152a10d1d524 *DESCRIPTION
2fffc5ac6f14c8ca4bf72103687c10aa *NAMESPACE
72108faa8562fc119253eafab534c816 *NEWS.md
9e96e1e5ceef080fcb192969a8481e26 *DESCRIPTION
c57ac75d78b909f00d3e7d2756c27fe4 *NAMESPACE
a1052ff3a8da5d3b02d6708bacab5135 *NEWS.md
5ca494860f345762e5ca20ebc046b926 *R/doges.R
caa74c35eb1f53d4fd4fd235b8b02b30 *R/families.R
77e2a2bc9b38abac7cf1a887602c5fd7 *R/marriage.graph.R
c6823e379f6432d8f780a12900289f37 *R/marriage.graph.slice.R
a80a70a5c9afe7eda37a9854b2ca7222 *README.md
7e18666c56215cafc2c394f982144f6b *build/partial.rdb
9452068e2fbfee1956973fd32e7d87e6 *build/vignette.rds
d2157141bc079d17226543a4172845e1 *README.md
8945de40ce3154be953e63accb36dc43 *build/partial.rdb
65ca1f2df800ae4a9d103f89d6d45b77 *build/vignette.rds
660f8bab876041f72ee00ff1f51d3159 *data/doge.families.rda
9ccc2d940145adf28aedcc878acea3fd *data/doges.marriages.rda
e9f50d517a7eb633aee5d65836485067 *data/doges.rda
19de97e70b6602d386afb4ec1937410d *data/doges.marriages.rda
028ba707b980250693f730e11ad692d2 *data/doges.rda
3b76e2fd1fd95bf79e2a4ae96a7e6fc0 *data/doges.years.rda
6c21d60801f2ba759fc31d6489113df3 *data/families.rda
ec87efd5e2a24e47086a4a730b270171 *data/families.rda
e399cbfa614e2a707ae7eaec3777986c *data/family.colors.rda
10aa16960c1b73d31f5227da9730ba02 *inst/REFERENCES.bib
6a25bdc08e78429c8909e1de9cad3026 *inst/doc/counting-doge-families.R
5a2585a9407c1f9fad2a9a5f146d1dd5 *inst/doc/counting-doge-families.Rmd
380169b4531a27cb1691536102f1a631 *inst/doc/counting-doge-families.html
560e38a2ef9e039febbb56fe840e5200 *inst/doc/counting-doge-families.html
0ce85d52521f843919ead878fc52e826 *inst/doc/doge-types.R
54a59f6d0584420184a8095f04f3e7c1 *inst/doc/doge-types.Rmd
6e524923296b8649e6a21217e036e2a1 *inst/doc/doge-types.html
350f5d9a9e0a5eb5a30348ae7696ae27 *inst/doc/doges-family-types.R
9f3f78c5216d6c37e9a2857b4ce799c1 *inst/doc/doges-family-types.Rmd
dba77f048d676f4adf5da41b38e6eca1 *inst/doc/doges-family-types.html
abe1ae4f1f197237547e6cb9b890b5ab *inst/doc/doges-family-types.Rmd
8b15e835862c3a65738d141b300c01a0 *inst/doc/doges-family-types.html
00e7cf8fdf6c27b11130a10fd93706be *inst/doc/doges-social-network.R
b0ff3a52065853aedb34851db83622cb *inst/doc/doges-social-network.Rmd
ccd9bd7e514c167276a316dbf6f0b8ef *inst/doc/doges-social-network.html
25f13b6111ec460ee73d372580f0a9a3 *inst/doc/doges-social-network.html
a74e2f92fefe60d7bb6eefa64d82db0e *inst/doc/doges-split-social-network.R
7d5799a8b1231861a880721436629e06 *inst/doc/doges-split-social-network.Rmd
005af736e24061a814ea88c900c25315 *inst/doc/doges-split-social-network.html
0bd348bb77f35a2c743b7e44a118c333 *inst/doc/doges-split-social-network.Rmd
f860bcb810d18a6dbfa778a1645546d0 *inst/doc/doges-split-social-network.html
161bdc49e7dbc2e07d4d16a9f850ee69 *inst/doc/doges-terms.R
701c7cd2c68b8ffba018aab49160d854 *inst/doc/doges-terms.Rmd
94e7665670680af84a9f91c2bccb15da *inst/doc/doges-terms.html
3c1b99fa60e54953f433b178b7d87f91 *inst/doges.bib
2d11ca4bea375552a73ed27447aa5686 *inst/doc/doges-terms.Rmd
a10d248d64688ec2bb053799b487610e *inst/doc/doges-terms.html
63ff1b27828752ed6800d079042a7557 *inst/doges.bib
67c172b488abd266e3c350306e43fd46 *man/doge.families.Rd
0e184505f55c8dc69ddc12ca4f08c665 *man/doges.Rd
5041838acbb727af7fc3591935f9e297 *man/doges.marriages.Rd
8dbb66e25b7b563bc93115c44c9476b2 *man/doges.marriages.Rd
d57174905c8ee8aef9c35372d811ea10 *man/doges.years.Rd
f214f1277343c214e61f1b117a39115e *man/families.Rd
cc0c8409c340c8b5efce90c8bad3d62b *man/marriage.graph.Rd
341b5790828faa83fae544929ce5d44a *man/families.Rd
df6d7417d0cc7b70896432e5bf1b6bb8 *man/family.colors.Rd
e11427315f261f26650ab94ee9e41eba *man/marriage.graph.Rd
f2187d2d510a86dcb52a4db674aa8c1e *man/marriage.graph.slice.Rd
1d971f3ebe61e9a030d862e2a0eb2c63 *tests/testthat.R
67e4c0cb56799101d4a6638e7f433e3d *tests/testthat/test-dogesdata.R
d1e14f44066332f94e32fb06e4cbdcf0 *tests/testthat/test-dogesyearsdata.R
ba438b58fc6557e9584c71c25ba3ff19 *tests/testthat/test-marriagegraph-slice.R
d1d368569da96d95b9220b861996b2d5 *tests/testthat/test-marriagegraph.R
5a2585a9407c1f9fad2a9a5f146d1dd5 *vignettes/counting-doge-families.Rmd
9f3f78c5216d6c37e9a2857b4ce799c1 *vignettes/doges-family-types.Rmd
54a59f6d0584420184a8095f04f3e7c1 *vignettes/doge-types.Rmd
abe1ae4f1f197237547e6cb9b890b5ab *vignettes/doges-family-types.Rmd
b0ff3a52065853aedb34851db83622cb *vignettes/doges-social-network.Rmd
7d5799a8b1231861a880721436629e06 *vignettes/doges-split-social-network.Rmd
701c7cd2c68b8ffba018aab49160d854 *vignettes/doges-terms.Rmd
0bd348bb77f35a2c743b7e44a118c333 *vignettes/doges-split-social-network.Rmd
2d11ca4bea375552a73ed27447aa5686 *vignettes/doges-terms.Rmd
1 change: 1 addition & 0 deletions NAMESPACE
Expand Up @@ -4,5 +4,6 @@ import(knitr)
import(qpdf)
import(rmarkdown)
import(ggplot2)
import(ggthemes)
importFrom(Rdpack,reprompt)
importFrom(igraph,graph.data.frame,V,"V<-")
23 changes: 23 additions & 0 deletions NEWS.md
@@ -1,37 +1,60 @@
# doges 0.5.0

Fixes:

* Some grammar and spelling fixes
* Data on doges fixed
* All families have a type now, including "Unknown" for old families

Changes:

* Adds maternal connections found in the Wikipedia
* Assigns fixed colors to every type of *casata*
* Adds vignette for using it.
* Adds family type and color information to the graph

# doges 0.4.0

Fixes:

* Adds a missing doge to the dataset
* Fixes years in office so that they match each other

Changes:

* Changes doges.years to dataset, not function
* Adds marriage.graph.slice
* marriage.graph now adds family type

# doges 0.3.0

Fixes:

* Improves documentation, some errors in code, grammar fixes
* Adds family to the two doges that didn't have one. Used the name of the doge.

Changes:

* Adds `doge.families` which is a table of all families that had a doge, and how many doges there were.

# dogesr 0.2.0

Fixes:

* Improves documentation.

Changes:

* Adds `marriage.graph` with extracts an `igraph` usable data structure from the marriage data

# dogesr 0.1.6

Fixes:

* Improves documentation, fixing some issues with inserting references.

Changes:

* Mainly for my own use, creates a `Makefile` with common tasks

# dogesr 0.1.5
Expand Down
13 changes: 7 additions & 6 deletions README.md
Expand Up @@ -6,8 +6,8 @@
# dogesR

Module (with data) to work with the dogi and dogaresse of the Venetian
republic. Main intention is to analyze social networks resulting from marriages
and other interactions.
republic and their relatives. Main intention is to analyze social
networks resulting from marriages and other interactions.

## Install

Expand Down Expand Up @@ -39,26 +39,27 @@ You can retrieve this from the [bibliography file](inst/doges.bib) along with ot

## Examples

This package includes a couple of vignettes. Once installed, write `vignette("dogesr")` to check what's available. Also
This package includes a few vignettes. Once installed, write `vignette("dogesr")` to check what's available. Also

* `vignette("doges-family-types")` for how to use the family types data set
* `vignette("doges-terms")` to analyze the amount of time the doges lived/ruled using data provided in this package.
* `vignette("doges-social-network")` to get the marriage social network of doges and parents, and make some initial exploration.
* `vignette("doges-split-social-network")` to get the marriage social network of doges and parents for slices of time, from and to specific doges; this one shows how to get the social network before and after the Serrata.
* `vignette("counting-doge-families")` to work with a table of the families doges belonged to and how many times they actually "made doge"
* `vignette("counting-doge-families")` to work with a table of the families doges belonged to and how many times they actually "made doge".
* `vignette("doge-types")` to show the timeline of the different types of families that managed to "make doge".

## Work with data

Data in its original format is stored in the [`data-raw`](https://github.com/JJ/dogesr/tree/main/data-raw)
directory. If you change that data anyhow, type `make` to rebuild the
R data files (contained in the [`data`](data/) ) directory.

Any further change (columns and some such) will also need modification
Any further change (columns and suchlike) will also require modification
of the documentation at the [`man`](man/) directory.

## Papers

Please check the [`report`](https://github.com/JJ/dogesr/tree/main/reports)
Please check the [`reports`](https://github.com/JJ/dogesr/tree/main/reports)
subdirectory for published papers that use this library, and their sources,
which is released under a free license.

Expand Down
Binary file modified build/partial.rdb
Binary file not shown.
Binary file modified build/vignette.rds
Binary file not shown.
Binary file modified data/doges.marriages.rda
Binary file not shown.
Binary file modified data/doges.rda
Binary file not shown.
Binary file modified data/families.rda
Binary file not shown.
Binary file added data/family.colors.rda
Binary file not shown.
4 changes: 2 additions & 2 deletions inst/doc/counting-doge-families.html
Expand Up @@ -12,7 +12,7 @@

<meta name="author" content="JJ Merelo" />

<meta name="date" content="2023-06-15" />
<meta name="date" content="2023-08-21" />

<title>Using dogesr to find out about the doges families</title>

Expand Down Expand Up @@ -363,7 +363,7 @@
<h1 class="title toc-ignore">Using <code>dogesr</code> to find out about
the doges families</h1>
<h4 class="author">JJ Merelo</h4>
<h4 class="date">2023-06-15</h4>
<h4 class="date">2023-08-21</h4>



Expand Down
21 changes: 21 additions & 0 deletions inst/doc/doge-types.R
@@ -0,0 +1,21 @@
## ----setup, include = FALSE---------------------------------------------------
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)

## ----load---------------------------------------------------------------------
library(dogesr)
data("doges")
data("families")
data("family.colors")

doge.type <- unname(unlist(family.types[data.doges$Family.doge]))
doge.type.color <- unname(unlist(family.colors[doge.type]))
doge.timeline <- data.frame(start=data.doges$Start,end=data.doges$End,type=doge.type,color=doge.type.color)

## ----plot---------------------------------------------------------------------
library(ggplot2)
library(ggthemes)
ggplot(doge.timeline,aes(x=doge.timeline$end))+geom_segment(aes(x=start,xend=end,y=doge.type,yend=doge.type,color=doge.type.color))+theme_economist()+theme(legend.position="none")+xlab("Year")

62 changes: 62 additions & 0 deletions inst/doc/doge-types.Rmd
@@ -0,0 +1,62 @@
---
title: "Using `dogesr` for a Venetian doges timeline"
author: "JJ Merelo"
date: "`r Sys.Date()`"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Using `dogesr` for a Venetian doges timeline}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
bibliography: ../inst/doges.bib
---

```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```

## Introduction

The so called *ducali* families controlled elections to doge in the Republic of Venice for a good part of the early Modern age [@chojnacki1985kinship]. Only nobles were eligible for many of the jobs in the Venetian government, including of course doge. But Venetian nobility was not a homogeneous class, with many divisions based on when and how they effectively became part of the nobility. The families to which the first doges belonged are classified, in this library, as either *estinte* (extinct) or Unknown (in many cases, only the name of the doge is known, not the family name).

The *evangeliche* families are just four, and are part of the families that became noble during the *Serrata* [@lane2019enlargement], same as the *apostoliche* (which were twelve) and the *vecchie*. This set of families are jointly called *lunghi*; the denomination of the rest depends on when they became part of the Golden Book where all families were inscribed: either *nuove* (new) or *nuovissime* (very new); those called *soldi* are simply families that paid their way into nobility, something that became possible in the late stages of the Republic. The *ducali* families are, in fact, *nuove*, but they are just 15 families that were able to include one of their own as doge before the end of the XV century.

As a matter of fact, they monopolized the first job in the Republic for more than two centuries. This vignette tries to visualize this fact, using `dogesr`.

## Set up

```{r load}
library(dogesr)
data("doges")
data("families")
data("family.colors")
doge.type <- unname(unlist(family.types[data.doges$Family.doge]))
doge.type.color <- unname(unlist(family.colors[doge.type]))
doge.timeline <- data.frame(start=data.doges$Start,end=data.doges$End,type=doge.type,color=doge.type.color)
```

This will import the data from the `dogesr` package into the `data.doges` data frame, as well as the `family.types` and `family.colors`. The first maps family to type, the second family type to a pre-established color, which we would like to keep the same throughout the package for consistency.

Then, we create a data frame for the timeline, with the relevant variables: years when every doge started and ended his tenure, as well as family type and the corresponding color.

## Plotting the timeline

```{r plot}
library(ggplot2)
library(ggthemes)
ggplot(doge.timeline,aes(x=doge.timeline$end))+geom_segment(aes(x=start,xend=end,y=doge.type,yend=doge.type,color=doge.type.color))+theme_economist()+theme(legend.position="none")+xlab("Year")
```

We import the two libraries used for plotting the timeline, and use a specific theme to be able to see lines more clearly. What we see is that there is some alternance between family types, but the timeline is dominated by long stretches where families of a single type succeed each other as doges. Some types of families, notably the one called *soldi*, managed to have a single doge, Ludovico Manin, who was the last one before the extinction of the republic.

## Conclusions

Using `dogesr` we are able to gather some insight on the power dynamics of the Republic of Venice, and confirm the widely held belief that *ducali* families were in office for the best part of almost three centuries, from the XIV to the XVI century. Except for small gaps, the visualization shows that as a fact.

The reason why 15 families were the sole drivers of power in Venice for such an extended amount of time is left as an exercise.


## References

0 comments on commit fe97f94

Please sign in to comment.